I did with git:
git commit fileA
Then I edited fileA
Then I accidentally performed
git rm fileA
Is there a way to recover the fileA
from after performing the git rm
? git reset
and git checkout
will discard my edits and get the fileA
from after the commit.
No, there is no way to recover a file after you perform a git rm
.
As you stated performing
git reset HEAD
or
git reset --hard HEAD
will revert back to the previous set of the file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.