own*_*ing 6 git branch git-svn rebase
我有一个SVN分支的问题.我用它结帐了git checkout -t -b stable svn/stable.然后我做了一个合并git rebase master.之后,我尝试将合并更改提交到远程分支中git svn dcommit
但现在看来,Git将更改推入主干而不是分支:(
并git status告诉我:
# On branch stable
# Your branch and 'svn/stable' have diverged,
# and have 218 and 52 different commit(s) each, respectively.
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
...
Run Code Online (Sandbox Code Playgroud)
有人知道我做错了什么,怎么做对了?
我最近遇到了同样的错误。问题是,当您变基到 master 时,它首先将当前分支硬重置为 master,然后应用正在合并到它的提交。但是您的主分支已关联svn/trunk,因此新重置的分支也与其关联。因此git-svn,on认为当您推送提交时,dcommit提交会被“插入” 。svn/trunk
解决方案是使用git merge --no-ff代替git rebase. 或者使用 Subversion 本身的合并功能。