git-svn: reset tracking for master

Posted by digitala on Stack Overflow See other posts from Stack Overflow or by digitala
Published on 2010-05-14T16:23:35Z Indexed on 2010/05/14 16:34 UTC
Read the original article Hit count: 276

Filed under:
|
|
|

I'm using git-svn to work with an SVN repository. My working copies have been created using git svn clone -s http://foo.bar/myproject so that my working copy follows the default directory scheme for SVN (trunk, tags, branches).

Recently I've been working on a branch which was created using git-svn branch myremotebranch and checked-out using git checkout --track -b mybranch myremotebranch. I needed to work from multiple locations, so from the branch I git-svn dcommit-ed files to the SVN repository quite regularly.

After finishing my changes, I switched back to the master and executed a merge, committed the merge, and tried to dcommit the successful merge to the remote trunk.

It seems as though after the merge the remote tracking for the master has switched to the branch I was working on:

# git checkout master
# git merge mybranch
... (successful)
# git add .
# git commit -m '...'
# git svn dcommit
Committing to http://foo.bar/myproject/branches/myremotebranch ...
#

Is there a way I can update the master so that it's following remotes/trunk as before the merge?

I'm using git 1.7.0.5, if that's any help.

© Stack Overflow or respective owner

Related posts about git

Related posts about svn