简体   繁体   English

如果代码过时,默认的git svn dcommit失败了吗?

[英]Any way to default git svn dcommit to fail if code is out of date?

I like how (normal) git won't let me push if I haven't rebased with the latest code. 我喜欢,如果我不使用最新代码进行基础调整,git(普通)将如何不让我推送。 However with git svn, when I do git svn dcommit it automatically rebases (ie git svn rebase) and then commits. 但是使用git svn时,当我执行git svn dcommit时,它会自动重新设置基准(即git svn重新设置基准),然后提交。 Is there a way I can have it throw up an error message if there is new stuff to rebase? 如果有新的内容需要重新设置,是否有办法抛出错误消息?

No way. 没门。 There is always a chance that somebody will commit right after you made any check-as-you-are-looking-for and right before you actually commit something. 在您进行任何所需的检查之后,以及您实际提交某些东西之前,总是有可能有人会提交。 Just run git svn fetch every time before git svn dcommit to be almost sure git won't rebase automatically. 只需在git svn dcommit之前每次运行git svn fetch ,几乎可以确保git不会自动变基。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM