Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 git 存储库有问题。我将描述我所做的。
git init
git add origin git @ ...
git pull origin master
有什么办法可以恢复我的文件吗?
一个 git pull 是一个 fetch 和一个 merge 所以对于安全检查一个新分支是可逆的:
git checkout -b restore
然后回去
git reset --hard HEAD^