nirvdrum / svn2git

Ruby tool for importing existing svn projects into git.
MIT License
2.11k stars 443 forks source link

--rebase does not create new branches #149

Open herzbube opened 10 years ago

herzbube commented 10 years ago

The --rebase command line option does not create local branches for branches that were created in the upstream SVN repo since the last sync.

This problem is similar to what is reported in issue #87 for tags.

I'm on Mac OS X 10.9, the system version of git is 1.8.3.4. I'm using svn2git 2.2.2, with the fix in #132 applied locally.

herzbube commented 10 years ago

As a workaround, I currently create the local branches manually (before I can push the newly sync'ed changes to my blessed Git repo):

  1. List all branches: git branch -a
  2. Pick out remote SVN branches for which there is no corresponding local branch
  3. For every branch thus found: git branch [branch-name] remotes/svn/[branch-name]
cristcost commented 7 years ago

my workaround was slightly different:

After running svn2git --rebase --verbose, the new SVN branches were not available in the git repo, neither locally or as remote branch. Then I just run the command git svn fetch and git fetch --all before running again the the svn2git --rebase --verbose, and the second time the new branches were correctly imported.

I'm not sure which of the two fetch command has worked exactly, but after that the new SVN branches were visibile listing "git branch -a", then a svn2git --rebase has processed correctly those branch and now they are available.