Search code examples
gitsvngit-svn

extra branches created by git svn clone


Continuing from my previous question I decided to go ahead and reclone the thing :

$ git svn clone --branches=Branches/Wrye\ Bash/* \
--tags=Tags/Wrye\ Bash/* \
--trunk=Programs/Wrye\ Bash/ --prefix=svn/ \ 
--ignore-paths="^(?:Releases|Projects|Scripts|Games|)/|^Programs/\
(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/" \
--authors-file=authors_with_emails.txt \
svn://svn.code.sf.net/p/oblivionworks/code/ . >> 2013.07.28 2>&1

So now I only cloned a particular project with its branches and tags

Results :

$ git branch -a
* master
  remotes/svn/291-fixes
  remotes/svn/294.2%20bugfixes
  remotes/svn/294.2-3329021
  remotes/svn/295-3329021
  remotes/svn/295-fixes
  remotes/svn/296-unicode
  remotes/svn/302-fixes
  remotes/svn/dev-sharlikran
  remotes/svn/tags/274
  remotes/svn/tags/276
  remotes/svn/tags/288
  remotes/svn/tags/289
  remotes/svn/tags/290
  remotes/svn/tags/291
  remotes/svn/tags/291.1
  remotes/svn/tags/292
  remotes/svn/tags/293
  remotes/svn/tags/294
  remotes/svn/tags/294.1
  remotes/svn/tags/294.1.test
  remotes/svn/tags/294.2
  remotes/svn/tags/295
  remotes/svn/tags/295.1
  remotes/svn/tags/295.2
  remotes/svn/tags/295.3
  remotes/svn/tags/295.4
  remotes/svn/tags/295.5
  remotes/svn/tags/296
  remotes/svn/tags/297
  remotes/svn/tags/297.1
  remotes/svn/tags/298
  remotes/svn/tags/299
  remotes/svn/tags/300
  remotes/svn/tags/301
  remotes/svn/tags/302
  remotes/svn/tags/302.1
  remotes/svn/tags/302a
  remotes/svn/tags/303
  remotes/svn/tags/304
  remotes/svn/trunk

But the Branches/Wrye\ Bash/ folder only contains :

291-fixes
294.2-3329021
295-fixes
302-fixes
dev-sharlikran

So where did the remotes/svn/294.2%20bugfixes, remotes/svn/295-3329021 and remotes/svn/296-unicode pop from ?

r1947 = 435203c3dc4c8a608e3a33d325afd2013549fd34 (refs/remotes/svn/trunk)
Found possible branch point: svn://svn.code.sf.net/p/oblivionworks/code/Programs/Wrye%20Bash => svn://svn.code.sf.net/p/oblivionworks/code/Branches/Wrye%20Bash/296-unicode, 1947
Found branch parent: (refs/remotes/svn/296-unicode) 435203c3dc4c8a608e3a33d325afd2013549fd34
Following parent with do_switch
Successfully followed parent
r1948 = c5e6069b46f9501478e0f354c9956092be3e407f (refs/remotes/svn/296-unicode)
    M   Mopy/bash_default.ini
# etc

The complete log.

EDIT : Another question : Should I create local branches for those ?
Forgot to mention I intent this as a git-svn bridge for now but eventually as a complete migration - so I want to do it as correctly as possible

Notice I am not talking about the @branches


Solution

  • So where did the remotes/svn/294.2%20bugfixes, remotes/svn/295-3329021 and remotes/svn/296-unicode pop from ?

    From the SVN repo :-). Seriously, these branches existed under "Branches/Wrye Bash", but they were deleted later in SVN.

    If a branch is deleted in the SVN repository, git-svn will not delete the corresponding git branch (because otherwise the branch and all its [unmerged] commits would be lost in git).

    If these branches bother you, you'll have to delete them manually. See e.g.How can I make git-svn get rid of remote branches that don't exist anymore?

    EDIT : Another question : Should I create local branches for those ?

    Usually, you only create a local branch if you want to commit to it. So there's no need to create local branches in advance, you can do it once you want to work on it.