Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 just remove it, so it's not sitting at the top of his log all the time?

like image 492
jeffbyrnes Avatar asked Nov 04 '22 17:11

jeffbyrnes


1 Answers

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

screenshot

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 ;-).

like image 115
Jonas Heidelberg Avatar answered Nov 09 '22 09:11

Jonas Heidelberg