尝试按照此答案将现有的 git 存储库导入 SVN ;几次提交都很顺利,但后来我遇到了一个失败的预提交钩子。
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
我把钩子修好了,这样我就可以过去了;但是当我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?