git-svn 尝试提交到错误的分支
git-svn dcommit 正在尝试推送到错误的 SVN 分支。这就是我所做的:
git checkout -b branch_a svn/branch_a # git-svn clone prepended all remote SVN branches with svn/
git svn branch -m "a message" branch_b
git checkout -b branch_b svn/branch_b
<make some commits>
git svn dcommit
git checkout branch_a
git svn rebase
git checkout branch_b
git rebase branch_a
这是我从 解释的“正确”分支/合并策略这个 StackOverflow 问题。
现在我陷入了困境。 branch_b
中的 git svn dcommit
尝试推送到 svn/branch_a
的 SVN URL。 git svn info 的输出证实了这一点。这也不是我想要或期望的。
有趣的是, git log --grep='^git-svn-id:' --first-parent -1
显示了正确的 SVN 分支,即 svn/branch_b
的 URL 。我读到这个命令应该来揭示 git-svn 将提交到的位置。
那么:
- 我做错了什么?
- 我该如何修复它(即将
branch_b
推送到svn/branch_b
git-svn dcommit
is trying to push to the wrong SVN branch. Here's what I did:
git checkout -b branch_a svn/branch_a # git-svn clone prepended all remote SVN branches with svn/
git svn branch -m "a message" branch_b
git checkout -b branch_b svn/branch_b
<make some commits>
git svn dcommit
git checkout branch_a
git svn rebase
git checkout branch_b
git rebase branch_a
This is the "correct" branching/merging strategy I interpret from this StackOverflow question.
Now I'm in a pickle. git svn dcommit
from branch_b
attempts to push to the SVN URL for svn/branch_a
. This is confirmed by the output of git svn info
. This is also not what I want or expect.
Interestingly, git log --grep='^git-svn-id:' --first-parent -1
shows the correct SVN branch, the URL for svn/branch_b
. I've read that this command is supposed to reveal where git-svn will dcommit to.
So:
- What did I do wrong?
- How can I fix it (i.e., push
branch_b
tosvn/branch_b
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看您的签出命令,似乎您可能没有指示 git svn 正确跟踪远程 SVN 分支。尝试这些命令:
然后验证您在每个命令后跟踪的分支:
然后每个分支应该跟踪正确的远程分支。
Looking over your checkout commands, it seems you may not have instructed git svn to track the remote SVN branches correctly. Try these commands:
and then verify the branch you are tracking after each with:
Each branch should then be tracking the correct remote branch.