2

Possible Duplicate:
git-svn: reset tracking for master

I have a git clone of a Subversion repository that has the standard trunk/branches/tags layout. I cloned the repository using the --stdlayout option. I created a branch using

git svn branch -m "Creating new branch." mybranch

And then checked it out using

git checkout --track -b mybranch remotes/mybranch

I made a few commits and merged in changes from master (equal to remotes/trunk). I did svn dcommit and it properly committed to the SVN branch branches/mybranch.

I switched back to master using

git checkout master

I merged in the work from mybranch using

git merge mybranch

I then tried to push the merge into trunk using svn dcommit, however, git is stuck attempting to push only to branches/mybranch instead of trunk, even though master should be pushing to trunk.

I tried making a small change to master, committing it locally, and then trying svn dcommit again, but it still wants to push to branches/mybranch instead of trunk.

I don't understand what has happened, because master used to be following and would push to trunk, but no longer does after merging in mybranch. How can I get master to once again synchronize with trunk in the SVN repository, and what can I do in the future to avoid master un-following the SVN trunk?

Community
  • 1
  • 1
gotgenes
  • 38,661
  • 28
  • 100
  • 128
  • 1
    See http://stackoverflow.com/questions/2835791/git-svn-reset-tracking-for-master – VonC Aug 12 '10 at 18:28
  • @VonC Thank you! This question is a duplicate of the one you linked to. – gotgenes Aug 12 '10 at 18:51
  • Never use git merge when you are working with git-svn. there are several good blog entries describing how to work with branches when using git-svn. – reto Aug 25 '10 at 07:34
  • @reto If you post links to these blog posts as an answer in http://stackoverflow.com/questions/2835791/git-svn-reset-tracking-for-master I will gladly up-vote your answer. – gotgenes Aug 25 '10 at 14:27

0 Answers0