Error report
After deleting files in local folder , git pull does not work. Displayed as follows:
*@*** MINGW64 ~/****/haha (master)
$ git pull origin master
From https://gitee.com/****/haha
* branch master -> FETCH_HEAD
Already up to date.
solve
method one
The command is as follows:
git checkout head <文件名>
For example, delete a.txt by mistake:
git checkout head a.txt
Restore all files with one command:
git checkout head .
Method Two
The reference articles are as follows:
Enter the code as follows:
git fetch --all
git reset --hard origin/master
The above two steps seem to be ok. There is also a third step of code, I tried it and it doesn't seem to work:
git pull