'Fixing Bad badEmail: invalid author/committer line - bad email in Git Repository
I have a git repository I am attempting to move to github from bitbucket. This is something I have done before without much difficulty, both using the github importer tool and manually sending up a repo. In this particular case, however, my repository seems to have an issue in its history, which causes github to fail. Notably, when I run git fsck, I get:
git fsck
Checking object directories: 100% (256/256), done.
error in commit 18e86b4bdd4172bfca9f635abfedc84a8bf39bd7: badEmail: invalid author/committer line - bad email
Checking objects: 100% (90779/90779), done.
Git fsck seems to be telling there is a single bad commit, but when I look at this commit, I do not see an obvious reason why it is incorrect (e.g., perhaps a rogue hidden character in the email?). In any case, in order to fix this, the first thing I have tried is to rebase. The tutorial I have attempted to follow seems to suggest to grab the parent commit, rebase, then switch to edit instead of pick in the list. When I do that I am getting a merge conflict:
Auto-merging HourOfCode/SourceCode/Biology.quorum
CONFLICT (content): Merge conflict in HourOfCode/SourceCode/Biology.quorum
error: could not apply 18e86b4bd... Updated Breed method, IsParent method, added Tasks 2 - 6 sample code.
If I try to run the next commands in the tutorial anyway (typical amend commands), I get this:
git commit --amend --author="My Name <[email protected]>"
U HourOfCode/SourceCode/Biology.quorum
error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
Now, I know I could just add the file, but given the impact rebase can have on a repo, it is not clear I have any of this right. I know if such a change goes through everyone will have to re-clone, but my question is, how do I fix this "bad email" into something acceptable and push up this history changing change without damaging my public repository?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
