Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Adding a new branch

mnaganov edited this page May 8, 2012 · 4 revisions

When a new branch has been added into SVN repo, a corresponding Git branch must be created and set up for tracking.

  • in the SVN history, find the "version" commit that precedes branch creation, obtain its hash (git svn find-rev rXXXX on the trunk branch);
  • in the Git repo, create a file in the .git/refs/remotes/branches with the name of the branch (say 3.3), and write the commit hash there;
  • in .git/config, add the new branch (in the list of branches, and a section);
  • create a git branch for tracking: git branch --track 3.3 refs/remotes/branches/3.3;
  • erase git-svn cache: rm -rf .git/svn;
  • git svn fetch (will take awhile);
  • add the new branch into the list in update.sh script.
Clone this wiki locally