Undo deleted files in git?

前端 未结 3 871
盖世英雄少女心
盖世英雄少女心 2021-01-24 18:37

Newbie needs some help undoing a mess!

I was tring to push my site to a git repository, so I used the git add command. Then, before I did the commit, I realized I had a

3条回答
  •  無奈伤痛
    2021-01-24 19:36

    If you already deleted all files in your workspace. You can get it back by using the following command.

    git checkout -f
    

    The files should be back!

提交回复
热议问题