git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: badgerhardy <andrew.hardy@gl-group.com>
To: git@vger.kernel.org
Subject: Re: git svn dcommit sends to wrong branch
Date: Thu, 26 Jan 2012 07:27:38 -0800 (PST)	[thread overview]
Message-ID: <1327591658546-7227251.post@n2.nabble.com> (raw)
In-Reply-To: <877h0yz269.fsf@thomas.inf.ethz.ch>


Thomas Rast wrote
> 
> 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.

      reply	other threads:[~2012-01-26 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-10 16:18 git svn dcommit sends to wrong branch Victor Engmark
2012-01-10 19:43 ` Thomas Rast
2012-01-11 14:05 ` Victor Engmark
2012-01-11 15:31   ` Thomas Rast
2012-01-26 15:27     ` badgerhardy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327591658546-7227251.post@n2.nabble.com \
    --to=andrew.hardy@gl-group.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).