gpt4 book ai didi

GIT存储库: "invalid author/committer line - missing space before date"

转载 作者:行者123 更新时间:2023-12-02 04:00:59 31 4
gpt4 key购买 nike

当尝试从 bitbucket 移动到 github 时,我在一次提交中遇到了 fatal error :

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

cat-file 显示:

author john <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="315b5e595f71555e541f525e5c" rel="noreferrer noopener nofollow">[email protected]</a>>removed backup files. Modified  <> 1397201439 +0200
committer john <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e2888d8a8ca2868d87cc818d8f" rel="noreferrer noopener nofollow">[email protected]</a>> 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="joh<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f896d69c979db89a949990d69b9795" rel="noreferrer noopener nofollow">[email protected]</a>"
fi' --tag-name-filter cat -- --branches --tags

关于GIT存储库: "invalid author/committer line - missing space before date",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41951493/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com