Your operation will not cause file loss, please review your operation steps
When git pull has untracked files locally, if there are no conflicts, these files will be ignored and will not cause file loss.
If there is a conflict, the pull will fail and will not cause file loss
I asked on stackoverflow and used git fsck --lost-found,然后文件会恢复在.git/lost-found/otherinside, but the directory structure and file name cannot be restored
git reflog
: View commit historygit reset --hard id
: id is the corresponding history found above, give it a try?Your operation will not cause file loss, please review your operation steps
When git pull has untracked files locally, if there are no conflicts, these files will be ignored and will not cause file loss.
If there is a conflict, the pull will fail and will not cause file loss
I asked on stackoverflow and used
git fsck --lost-found
,然后文件会恢复在.git/lost-found/other
inside, but the directory structure and file name cannot be restored