根据 this answer 尝试将现有的 git 存储库导入 SVN ;几次提交都很顺利,但后来我遇到了一个失败的预提交 Hook 。
r180827 = 444fa1c75e5a31fe8d887637a7fbd3fc62b34354 (refs/remotes/trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M [some file]
M [another file]
M [...etc...]
A [problem file]
A repository hook failed: 'pre-commit' hook failed with error output:
[error description]
at /usr/libexec/git-core/git-svn line 922
我修好了钩子(Hook),这样我就可以过去了;但是当我再次尝试 git svn dcommit
时(显然是错误的),我得到了
[some file]: needs update
[another file]: needs update
[...etc...]
当我执行“git status”时,我得到:
# modified: [some file]
# modified: [another file]
# modified: [...etc...]
#
# Untracked files:
# (use "git add<file>..." to include in what will be committed
#
# [problem file]
# [other file modified in the commit that created the problem file]
# [yet other files modified in that commit]
# [...etc...]
我想我可以把整个 SVN 树吹走并重新开始,但我真的不想这样做。我如何从中恢复并继续 dcommit?
最佳答案
由于提交时出现以下错误,我遇到了完全相同的问题:
0 [main] perl.exe" 5992 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
6635 [main] perl.exe" 5992 open_stackdumpfile: Dumping stack trace to perl.exe.stackdump
由于找不到任何其他解决方案,我只是对现在“未提交”的更改进行了本地提交(根据问题中的最后一个示例),然后我可以再次运行 dcommit。这有效地将剩余的本地提交压缩为一个,但至少它起作用了。
如果有人知道更好的解决方案,将不胜感激。
关于git - 预提交 Hook 失败后继续部分 git svn dcommit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10901652/