开发者

Has anybody seen git create a commit that has no date & an all-zero hash?

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 jus开发者_JAVA技巧t remove it, so it's not sitting at the top of his log all the time?


TortoiseGit shows the state of the current working copy with "commit 0000":

Has anybody seen git create a commit that has no date & an all-zero hash?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜