我尝试使用"git-svn-dcommit",但出现了以下错误:
存储库挂钩失败:"预提交"挂钩失败,错误输出:
*** Transaction blocked
TRAILING WHITESPACE discovered in these files
designs/trunk/1167923/cfg/main.cpp
designs/trunk/1167923/cfg/Registers.cpp
Code does not conform to whitespace standard
at /usr/lib/git-core/git-svn line 922
我不知道怎么修。
这是我的配置:
receive.denynonfastforwards=true
alias.st=status
alias.ci=commit
alias.co=checkout
alias.br=branch
alias.log1=log --oneline
alias.fetchavs=fetch --all --progress -v
alias.pushav=push --all --progress -v
alias.dfb=diff -b
alias.dfw=diff -w
color.ui=auto
color.branch=auto
color.diff=auto
color.interactive=auto
color.status=auto
core.autocrlf=input
core.safecrlf=true
core.whitespace=nowarn
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
svn-remote.svn.url=http://svn
svn-remote.svn.fetch=designs/trunk/1167923:refs/remotes/trunk
svn-remote.svn.branches=designs/branches/1167923/*:refs/remotes/*
svn-remote.svn.tags=designs/tags/1167923/*:refs/remotes/tags/*
该错误将来自您的远程(svn)服务器-您的git-svn配置并不特别相关。
您需要编辑挂起的提交,以便服务器接受每个单独的提交。
例如
git rebase -i HEAD~10
- 确定问题提交
- 选择e进行编辑
- 更正空白错误
git commit -va --amend
git rebase --continue
然后再次尝试dcommit
。
在您自己的git预提交挂钩中放入等价的检查将符合您的利益,这样您就可以在提交时知道,当您的更改被推送到svn时,将被拒绝,因此可以进行更正。