git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn stubbornly re-creating branch "master"

From
MOMarcin Owsiany <porridge@debian.org>
Date
Mar 29, 2009, 17:13 UTC
Message-ID
<20090329171347.GA26866@beczulka>
Hello,

I created my git repository by cloning it with git-svn from an upstream SVN repository. When I did that, a branch "master" was created. Afterwards I renamed that branch to "upstream". However every time I "git-svn fetch", it recreates the "master" branch, pointing it at the newest upstream commit.

Ideally, I'd like it to just forget about "master" and do the same to my "upstream" branch. Is it possible?

If not, then is it at least possible to have it not recreate the "master" branch? It clutters my view.

Here's a typescript (with git 1:1.5.6.3-1.1ubuntu2):
$ svnadmin create svn-repo
$ r=`pwd`/svn-repo
$ svn co file://$r svn
Checked out revision 0.
$ (cd svn && echo one >> file && svn add file && svn ci -m one file)
A         file
Adding         file
Transmitting file data .
Committed revision 1.
$ git-svn clone file://$r git
Initialized empty Git repository in /home/mowsiany/tmp/gs/git/.git/
        A       file
r1 = 66e7199fe089b1e626efb5f2f3106189d992d288 (git-svn)
Checked out HEAD:
  file:///home/mowsiany/tmp/gs/svn-repo r1
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd git && git branch mystuff )
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd git && git branch -m master upstream )
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd svn && echo two >> file  && svn ci -m two file)
Sending        file
Transmitting file data .
Committed revision 2.
$ (cd git && git-svn fetch  )
        M       file
r2 = c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b (git-svn)
$ (cd git && git show-ref )
c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream
c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/remotes/git-svn
As you can see, "master" sprang back to life after the last command.
-- 
Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216
Next: Dmitry Potapov
Message 1 of 10 in “git-svn stubbornly re-creating branch "master"”
  1. Marcin OwsianyMar 29, 2009
  2. Dmitry PotapovMar 29, 2009
  3. Mikael MagnussonApr 3, 2009
  4. Marcin OwsianyJun 6, 2009
  5. Marcin OwsianyJun 14, 2009
  6. Andreas EricssonJun 14, 2009
  7. Marcin OwsianyJun 14, 2009
  8. Eric WongMar 29, 2009
  9. David KågedalApr 3, 2009
  10. Marcin OwsianyApr 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.