While working with git-svn, and a ‘typical’ svn repo /trunk, /branches/…, /tags/…
How do I push a local branch to a new branch inside of /branches ?
While working with git-svn, and a ‘typical’ svn repo /trunk, /branches/…, /tags/… How do
Share
Say we have a skeleton Subversion repository with empty
trunk/,branches/, andtags/:The explanation below will switch back-and-forth between two views of the same repository, a Subversion working copy of the entire repo (not just
trunk) and agit-svnclone. For clarity, each shell prompt’s prefix will indicate the current directory.On the svn side, you’ll now see
You’ll also see the new branch on the git side:
To commit to the newly created branch, first switch to it:
Next, we’ll create a dummy git commit
and finally send it to Subversion:
/tmp/git-svn-repo$ git svn dcommit Committing to file:///tmp/svn-repo/branches/my-branch ... A on-my-branch Committed r3 A on-my-branch r3 = d3c5ba3e03e5cdee96f470ff4c9898eb7c523ed8 (refs/remotes/my-branch) No changes between current HEAD and refs/remotes/my-branch Resetting to the latest refs/remotes/my-branchThe Subversion working-copy gives us confirmation: