EDIT: I see that this question has been asked before! git-svn: reset tracking for master Someone with the right permissions can probably close this as a duplicate.
I'm using git-svn. I recently finished working on a branch in git that was tracking a branch in SVN. While working in the branch, I was using the following two commands
$ git svn rebase
$ big svn dcommit
and all was well. "master" in git was tracking svn/trunk and "myBranch" in git was tracking svn/branches/myBranch. But after I merged everything locally in git
$ git checkout master
$ git merge myBranch
I went to push ... and assumed that master would push to svn/trunk. But it didn't. Instead, "master" now ALSO pushes to svn/branches/myBranch. Somehow, when I merged "myBranch" into "master", "master's" tracking got altered.
I am probably doing this wrong - but I tried to explicitly "push" to trunk ...
$ git svn dcommit remotes/trunk master
But that syntax failed and now I've got
$ Committing to http://<repo>/trunk ...
dcommitted on a detached HEAD because you gave a revision argument.
The rewritten commit is: b461234...
with SVN trunk still not updated.
How do I merge in git and then push that to SVN? I was following the guide here which implies that I can merge with normal git syntax. It just doesn't follow up and explain why my "master" is not tracking the branch I merge in.
I also have git-tower which I use in parallel with the command line and after I manually merged as above, tower now "shows" all the remote branches in the drop down to "push" or dcommit to, but I can't change the selection from svn/myBranch ... which possibly implies that I can't?