Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GIT存储库:";无效的作者/提交人行-日期前缺少空格“;_Git - Fatal编程技术网

GIT存储库:";无效的作者/提交人行-日期前缺少空格“;

GIT存储库:";无效的作者/提交人行-日期前缺少空格“;,git,Git,尝试从bitbucket移动到github时,我在一次提交中遇到了致命错误: error in commit d8b1774aa7bd98c6494a1e31acef943d0e0cbf03: missingSpaceBeforeDate: invalid author/committer line - missing space before date cat文件显示: author john <john@doe.com>removed backup files. Modifie

尝试从bitbucket移动到github时,我在一次提交中遇到了致命错误:

error in commit d8b1774aa7bd98c6494a1e31acef943d0e0cbf03: missingSpaceBeforeDate: invalid author/committer line - missing space before date
cat文件
显示:

author john <john@doe.com>removed backup files. Modified  <> 1397201439 +0200
committer john <john@doe.com> 1397201439 +0200
作者john删除了备份文件。修改1397201439+0200
提交人约翰1397201439+0200
如何修改此提交并添加缺少的空间?

解决了以下问题:

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
通过以下方式解决了该问题:

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