如何查看已经检查到git中,但尚未通过dcommit提交给svn? [英] How to see what has been checked into git, but hasn't been committed to svn via dcommit?

查看:115
本文介绍了如何查看已经检查到git中,但尚未通过dcommit提交给svn?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用git-svn。我怎么能得到我已经提交到git的列表,但自从上一次 git svn dcommit 以来还没有提交到SVN存储库?也就是说,如果我做了一个dcommit,我该如何验证即将发送的内容?

解决方案 <对于 git svn dcommit 来说,干运行选项对于准确找出将要提交给Subversion的内容非常有用。特别是它具有以下属性:


  • 它实际上并没有向Subversion提交任何内容

  • 它告诉你将在Subversion中创建新版本的计算差异

  • 它会告诉你Subversion中的哪个分支将被提交 - 这有时并不明显,因为它取自在第一个祖先中指定的Subversion分支在其提交消息中提交了一个git-svn-id


    总的来说,在考虑使用 dcommit 之前做 git svn rebase ,这样你的历史就会线性化 - 否则合并提交可能会失败在Subversion历史上有很多意义。 (如果你已经这样做了,那么 git log gitk --all 也基本相同,但是我认为 git svn dcommit --dry-run 可以让你更准确地了解即将发生的事情,即使它更难解释。)


    I'm using git-svn. How can I get a list of what I've committed into git, but haven't yet committed to the SVN repository since the last git svn dcommit? That is, how can I verify what is about to be sent if I do a dcommit?

    解决方案

    The --dry-run option for git svn dcommit is very useful for finding out exactly what will be committed to Subversion. In particular that has the properties that:

    • It doesn't actually commit anything to Subversion
    • It tells you which diffs will be calculated to create new revisions in Subversion
    • It tells you which branch in Subversion you will be committing to - this is sometimes non-obvious, since it is taken from the Subversion branch specified in the first ancestor commit with a git-svn-id in its commit message

    In general it's a good idea to do git svn rebase before even thinking about using dcommit, so that your history is linearized - otherwise merge commits may not make much sense in the Subversion history. (If you've done that, then git log and gitk --all will also be essentially equivalent, but I think git svn dcommit --dry-run gives you a more accurate picture of what's about to happen, even if it's more difficult to interpret.)

    这篇关于如何查看已经检查到git中,但尚未通过dcommit提交给svn?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆