git - 预提交 Hook 失败后继续部分 git svn dcommit

标签 git svn git-svn

根据 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/

相关文章:

security - 使用在线 SVN 存储库有多安全?

svn - 获取 SVN 中作者的电子邮件地址

git - 如何 git-svn 从 Subversion 存储库中克隆最后的 n 个修订版?

git - 将 Jekyll 站点发布到 Git 存储库

windows - 将 Visual SVN 与 IIS 同步以进行 Web 开发(或任何其他文件夹)

Git Push 有效,但文件不在服务器上

git - 如何在提交前查看 'git svn dcommit' 的变化?

Git-Svn:在 dcommit 之后保留提交时间戳

git - Windows 10 上 Intellij 的 GIT 终端中的自动完成分支名称

ruby-on-rails - 在 Rails 应用程序中本地使用 gem 而不修改 Gemfile