I want to undo the git add operation, so git reset --hard HEAD
git add
git reset --hard HEAD
The result returns to the position of the last submission. What should I do to retrieve uncommitted modified files...
Also next time I will use git rm --cached, shame (:
git rm --cached
小伙看你根骨奇佳,潜力无限,来学PHP伐。
You can try git reflogCommand:
git reflog
If you accidentally use git commit --amend as git commit to overwrite the current commit, or accidentally destroy the current commit (reset --hard). All can be restored through git reflog. https://github.com/hokein/Wik...
git reset also has other parameters, such as soft|mixed, you can take a look
You can try
git reflog
Command:git reset also has other parameters, such as soft|mixed, you can take a look