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

git-svn clone -s fails to setup branches in git if the most recent svn commit was not to trunk

From
ASAdam Soltys <adam.soltys@pwgsc.gc.ca>
Date
Jan 14, 2009, 21:27 UTC
Message-ID
<loom.20090114T211218-628@post.gmane.org>

I ran the following command to clone from an svn repository that followed the standard svn folder layout and had two branches:

svn clone -s svn://path/to/my_repo
I then typed:
git branch -r
Which returned:

origin/HEAD origin/master

I was expecting to see the branches and tags from the svn /branches and /tags folders but they did not appear.

I checked out origin/HEAD and origin/master to see what was there and I found they contained code from a subversion branch that was originally in the /branches folder. I noticed that this particular branch was the last place committed to in the svn repo. So I checked something into the /trunk of the svn repo, nuked the git repo, and ran the git svn clone command again. This time it worked as expected and "git branch -r" showed me all my tags and branches.

Next: Boyd Stephen Smith Jr.
Message 1 of 2 in “git-svn clone -s fails to setup branches in git if the most recent svn commit was not to trunk”
  1. Adam SoltysJan 14, 2009
  2. Boyd Stephen Smith Jr.Jan 14, 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.