Restore a deleted folder in a Git repo

后端 未结 8 627
执笔经年
执笔经年 2020-12-02 07:22

I have deleted all the contents inside a folder and the folder is empty. I still had a copy in my remote repo. But when I did a git pull it didn\'t put back the

8条回答
  •  [愿得一人]
    2020-12-02 08:01

    If you have not yet commited your changes you can revert content or a directory:

    git checkout -- removed_directory
    

    If you want to revert all changes do:

    git reset --hard HEAD
    

提交回复
热议问题