在这些文件中发现带有尾随空格的git svn dcommit错误
我尝试使用“git svn dcommit”,但出现以下错误: 存储库挂钩失败:“预提交”挂钩失败,输出错误:在这些文件中发现带有尾随空格的git svn dcommit错误,git,svn,Git,Svn,我尝试使用“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 whi
*** 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头~10
- 确定问题并提交
- 选择e进行编辑
- 更正您的空白错误
git提交-va——修改
git-rebase——继续
dcommit
在您自己的git pre-commit钩子中放入等价的检查符合您的利益,这样您就可以在提交时知道,当推送到svn时,您的更改将被拒绝,因此可以更正。在查看了您现有的问题后,请检查这些问题并投票选出您喜欢的答案,并接受一些答案。谢谢您的回复。我还没试过。但我觉得我不明白。如果是来自远程(svn)服务器的问题,为什么我可以使用
svn commit
命令签入同一个文件?git svn dcommit
将每次向svn提交一次提交一次—您没有以与提交失败完全相同的状态提交文件。ALT查看/usr/lib/git core/git svn
第922行-这可能是git执行svn命令的那一行。ALT2-向cpp文件中添加一些空行,并尝试将它们直接提交给svn-比较错误消息。