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

Re: git svn dcommit sends to wrong branch

From
Bbadgerhardy <andrew.hardy@gl-group.com>
Date
Jan 26, 2012, 15:27 UTC
Message-ID
<1327591658546-7227251.post@n2.nabble.com>
In-Reply-To
<877h0yz269.fsf@thomas.inf.ethz.ch>
Thomas Rast wrote
Show 26 quoted lines
> 
> Victor Engmark &lt;victor.engmark@&gt; writes:
> 
> The rule is that the commits go to the branch named in the git-svn-id
> line of the most recent first-parent ancestor of HEAD.
> 
> You can find the "base" commit in question with
> 
>   git log -1 --first-parent --grep=^git-svn-id:
> 
>> And more importantly, how do I "replay" my commits on trunk?
> 
> You need to rebase the commits on trunk, and (very important) strip the
> git-svn-id lines from their messages.  If you only had a handful of
> commits, your best bet is to use something like
> 
>   git checkout -b newbranch
>   git rebase -i --onto svn/trunk svn/branch_name  # or whatever git-svn
> named the remote branches
>   # edit all the 'pick' into 'reword'
>   # in every commit message editor that pops up, remove the git-svn-id
> line
> 
>   gitk  # make sure that you like the resulting history!
>   git svn dcommit
> 

I had the same problem and have followed these instructions (thanks!). I now have a 'newbranch' that will correctly dcommit to the svn trunk. What happens to the git 'master'? Is this recoverable or do I need to delete it and rename the 'newbranch' as master?

Thanks,

-- View this message in context: http://git.661346.n2.nabble.com/git-svn-dcommit-sends-to-wrong-branch-tp7172744p7227251.html Sent from the git mailing list archive at Nabble.com.

Previous: Thomas Rast
Message 5 of 5 in “git svn dcommit sends to wrong branch”
  1. Victor EngmarkJan 10, 2012
  2. Thomas RastJan 10, 2012
  3. Victor EngmarkJan 11, 2012
  4. Thomas RastJan 11, 2012
  5. badgerhardyJan 26, 2012

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.