Git pull deleted uncommitted changes

前端 未结 5 1874
有刺的猬
有刺的猬 2020-12-03 18:29

I just made a new repository on github. Starting with a folder full of files, the steps I did were:

git init
git add -A
git remote add origin ...

#Now pull          


        
5条回答
  •  隐瞒了意图╮
    2020-12-03 19:14

    For me the following worked:

    1. Go to the affected file.
    2. Right click and choose Local History and select Show History. From there you can see the history of changes made to the file, and then choose the time you want to bring back the file to.
    3. You will get two windows with the left one having >>. Click on all the >> and this will send your changes to the right window.
    4. Close the window and here you go with your file restored to where you wanted it to be.

    I hope it helped!

提交回复
热议问题