2

When trying to make a move to github from bitbucket I've encountered fatal error in one of commits:

error in commit d8b1774aa7bd98c6494a1e31acef943d0e0cbf03: missingSpaceBeforeDate: invalid author/committer line - missing space before date

cat-file shows:

author john <john@doe.com>removed backup files. Modified  <> 1397201439 +0200
committer john <john@doe.com> 1397201439 +0200

How can I amend this commit and add missing space?

Vladimir Cvetic
  • 814
  • 3
  • 8
  • 22

1 Answers1

5

Solved the issue with:

git filter-branch --env-filter \
'if [ $GIT_COMMIT = d8b1774aa7bd98c6494a1e31acef943d0e0cbf03 ]
 then
     export GIT_AUTHOR_NAME="John"
     export GIT_AUTHOR_DATE="Fri, 11 Apr 2014 07:30:39 +0000"
     export GIT_COMMITTER_DATE="Fri, 11 Apr 2014 07:30:39 +0000"
     export GIT_AUTHOR_EMAIL="john.doe@blah.com"
 fi' --tag-name-filter cat -- --branches --tags
Vladimir Cvetic
  • 814
  • 3
  • 8
  • 22