When I run git fsck
I have some bad commits that I need to fix:
$ git fsck
Checking object directories: 100% (256/256), done.
error in commit 60707e738f5b4330147fff34d7ddc734eea4a577: missingSpaceBeforeDate: invalid author/committer line - missing space before date
error in commit c60d233e8296f9c7a1f6e50719e59bac6fdd272f: badDate: invalid author/committer line - bad date
Checking objects: 100% (163912/163912), done.
I tried to follow the answer in how-do-i-modify-a-specific-commit but when I run:
git rebase --interactive 'c60d233e8296f9c7a1f6e50719e59bac6fdd272f^'
I don't see c60d23
in the list of commits to edit, so there is nothing for me to "fix", since the commit in question is not on that list.
Any ideas on how I can fix this bad date
error on this commit?
Any third party tools that may help?
Thanks!
=====Update based on @hlovdal Answer=====
I ran git branch --contains c60d23
but it does not return anything.
I also ran:
git tag fsck-bad-60707e73 60707e73
git tag fsck-bad-c60d233e c60d233e
gitk --all &
But since that commit does not exist in a branch, I don't know how to rebase it :(