使用 git-svn dcommit 保留主题分支提交
我最近开始使用 git-svn。我的git工作流程是这样的。
git checkout大师
git svn 变基
git checkout -b topicbranch
..变化
git 提交
git checkout大师
git 合并主题分支
git svn 变基
git dcommit
问题是,每当我执行 dcommit 时,主题分支的唯一最终合并提交都会在 svn 存储库中看到。我想查看 svn 提交对应于主题分支中所做的各个 git 提交。
他们有什么办法可以做到吗?或者这是推荐的默认行为。
I started using git-svn recently. My git work flow is like this.
git checkout master
git svn rebase
git checkout -b topicbranch
..changes
git commit
git checkout master
git merge topicbranch
git svn rebase
git dcommit
Problem is that, whenever I do dcommit the only final merge commit of topic branch is seen in svn repository. I want to see the svn commits corresponds to individual git commits made in topic branch.
Is their any way to do it. Or this is the recommended default behavior.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(
git rebase
没有附加参数是一个错误,所以我怀疑你没有准确地描述你在做什么。此外,你错过了svn
git svn dcommit
。)但是,在我看来,问题似乎在于您将
topicbranch
合并到master
中,而没有先对其进行变基。这意味着,如果这不是快进合并,则会在 git 历史记录中添加合并提交,并且只能由 Subversion 中的单个提交来表示。在您完成主题分支后,请尝试以下操作:(
git rebase
with no additional arguments is an error, so I suspect you're not accurately describing what you're doing. Also, you've missed out thesvn
ingit svn dcommit
.)However, it looks to me as if the problem is that you're merging
topicbranch
intomaster
without rebasing it first. That means that if this doesn't turn out to be a fast-forward merge, there'll be a merge commit added in the git history, and that can only be represented by a single commit in Subversion. After you've worked on your topic branch, try the following instead: