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 reset:
git reset
git reset --hard HEAD
此命令将丢弃您自上次提交以来所做的任何工作副本更改。