【发布时间】:2014-04-26 07:46:35
【问题描述】:
我克隆了一个存储库,玩弄了一下,(哎呀)弄乱了我的代码。现在我只想恢复到存储库代码的干净克隆并重新开始。
我尝试从工作目录的终端使用以下内容:
git reset --hard # deletes watched filed in local working directory and staged area
git clean -n # shows what will be deleted without actually deleting anything (for the faint of heart)
git clean -f # deletes unwatched files
但是,当我运行git status 时,它仍然显示杂乱无章的文件。
是否有推荐的方法将您的机器重置为最新的签到?
【问题讨论】: