0

I am in the process of converting a Mercurial repository to Git, to be hosted on GitHub. The conversion with hggit seemingly went well, but trying to push to GitHub failed:

remote: error: object 27124f1fc9f51aed184f61c33dc9073f64bf95ba: 
nulInCommit: NUL byte in the commit object body

remote: fatal: Error in object
fatal: sha1 file '<stdout>' write error: Broken pipe KiB/s

Apparently, what is causing the error is one particular checkin done in Mercurial with a named branch that is empty (the branch name is an empty string).

So what is the best way to fix this? I envision having to strip the problematic commit from the repository, and then somehow re-apply the 1000 or so succeding commits.

commit graph

I suppose this could be done either in Mercurial og Git, and I would welcome suggestions for either one on how to strip out the offending commit.

Ola Eldøy
  • 5,720
  • 7
  • 49
  • 82
  • 2
    You say that the push failed, but you don't show any failing push. It seems likely that hggit made a weird (invalid) Git branch name out of the empty Mercurial name, but if so, it should be trivial to rename the Git branch to a valid name on the Git side. – torek Mar 15 '17 at 10:57
  • Failed how? Did you get an error message? – Lasse V. Karlsen Mar 15 '17 at 12:54

0 Answers0