有没有人见过 git 创建一个没有日期和日期的提交?全零哈希?
因此,有一天,一位团队成员在 Windows 中使用 TortoiseGit 提取了他的日志,顶部是一个完全由零组成的哈希值的提交,没有用户,也没有日期,但它确实有四个修改过的文件和一个提交信息。
这似乎是前一段时间的提交,但除此之外我们一无所知。
有没有办法纠正这个提交,或者只是删除它,这样它就不会一直位于日志的顶部?
So a fellow team member, using TortoiseGit in Windows, pulled up his log the other day, and at the top was a commit with a hash entirely of zeroes, no user, and no date, but it did have four modified files and a commit message.
It appears to be a commit from some time ago, but other than that we've no idea.
Is there any way to either correct this commit, or to just remove it, so it's not sitting at the top of his log all the time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TortoiseGit 用“commit 0000”显示当前工作副本的状态:
我不知道如何明确告诉 TortoiseGit为下一次提交保存提交消息,但是当合并失败时,该空间会预先填充合并消息,这可能会给人这样的印象:这已经是一次提交。
因此,要回答“如何纠正此问题”的实际问题,只需提交更改即可;-)。
TortoiseGit shows the state of the current working copy with "commit 0000":
I don't know how to explicitly tell TortoiseGit to save a commit message for the next commit, but when a merge fails this space is pre-populated with the merge message, which could give the impression this already is a commit.
So to answer the actual question "how to correct this", just commit the changes ;-).
如果工作目录是脏的,则可能只是一个伪提交来向您显示更改的内容。
If the Working Directory is dirty, it's possible that it's just a pseudo-commit to show you what's changed.