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

Re: git svn : some feedback and wonder...

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 11, 2009, 16:45 UTC
Message-ID
<4A08560F.8030800@drmicha.warpmail.net>
In-Reply-To
<1de9d39c0905110852v65b07bebl47cc9a58046c5288@mail.gmail.com>
jean-luc malet venit, vidit, dixit 11.05.2009 17:52:
Show 8 quoted lines
> hi
> I'm just toying with git svn....
> so I have an svn repository and I do a git svn clone -s
> http://path.to/my/repository
> here all is fine it checkout my trunk into master branch
> 
> 1) when I do a git branch -a, it show 2 branches : master and trunk,
> shouldn't it be master and svn/trunk?
No. Not unless you said --prefix=svn during clone.
> 2) when I create a branch using git svn branch it create an empty
> directory and not as expected a branch from the current revision of
> trunk

I get a branch as you expect. Can you repeat the commands which generated an unexpected result for you?

> 3) the branch appears in git branch -a without a remote
> information.... not easy to track
See 1)
> 4) you can't do git branch --track newbranch (where new branch is the
> svn branch), since the branch name isn't prefixed by svn/ you can't
> reuse the same name

You certainly can create a local branch with the same name. I just did. I always do. If b is that name, say

git branch --track b remotes/b
unless you have used --prefix, of course.
> 5) why having called dcommit instead of push? it would have been more
> understable (more coherent) git svn push would have pushed current
> branch on corresponding svn branch and git svn push somebranch would
> have do a git svn branch followed by the commits...
The latter would be inconsistent with git push as well.

Dcommit may be for historical reasons, but keep in mind that dcommit is not simply pushing. It involves rebasing and a whole git-svn-git roundtrip. It really is "do the commits" on the svn side.

> 6) why having called rebase instead of pull? git svn pull would have
> fetched svn/trackedbranch and merged into current branch, git svn pull
> somebranch would have merged into current branch the svn/somebranch
> (without traking info)
Because pull does not rebase by default, it uses merge!

Let me just add that with some more git experience, which includes reading man pages and trying things out, there certainly will be more insight into the why's and why not's of git-svn ;)

Cheers, Michael

Previous: jean-luc maletNext: MALET Jean-Luc
Message 2 of 4 in “git svn : some feedback and wonder...”
  1. jean-luc maletMay 11, 2009
  2. Michael J GruberMay 11, 2009
  3. MALET Jean-LucMay 11, 2009
  4. jean-luc maletMay 12, 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.