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 存储库、提交和检查 git 状态时,我有:
$ git status # On branch master nothing to commit (working directory clean)
但我不知道我在 master 之前提交了多少次提交。有人可以告诉我如何启用此选项吗?我记得我应该修改我的配置,但我找不到我应该改变什么。
我认为这是没有选择的。
当您在本地 PC 上向本地存储库提交某些内容时,您是远程分支的一个提交。因此,首先,当您将提交推送到主服务器时,您将拥有相同的状态。
我认为当你没有推送你的提交并格式化你的硬盘时,你的更改就会丢失。
Git 没有显示我在原点之前有多少次提交,我希望它
当您复制了整个 .git 目录时,这可能是另一种解决方案。