git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Segato <daniele.bilug@gmail.com>
To: Jens Kubieziel <kubieziel@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: Resolving a merge conflict with git-svn
Date: Sat, 14 Nov 2009 01:58:10 +0100	[thread overview]
Message-ID: <1258160291.6082.42.camel@localhost> (raw)
In-Reply-To: <76ee5f990911131630k41a91f70n5e717befb7693463@mail.gmail.com>

Il giorno sab, 14/11/2009 alle 01.30 +0100, Jens Kubieziel ha scritto:
> Hi,
> 
> I recently came across a big conflict. Someone used Subversion and
> made a complete wrong commit. I did a 'git svn rebase' at some point
> and ran into the conflict. My goal at this point was to remove the
> wrong commit, but I found no way how to do it (git-revert needs a
> clean tree; git stash brought [fatal: git-write-tree: error building
> trees,Cannot save the current state]). What way would suggest to
> remove that wrong made commit and continue with the rebase?

I don't know if this could help but I tell you what I would do.

I would abort the conflicting rebase

"backing up" my branch by:

git checkout mybranch
git checkout -b mybranchBackup

then I would do a git reset --hard <last-committed-svn-commit>

at this point a:
git svn rebase

shouldn't give conflict since it should be a fast forward.

Then you should have two branch:

mybranch: which is SVN-up-to-date but has no one of your modification
mybranchBackup: which has an old SVN before the wrong commit but with
all your modifications...

at this point you can use git revert to revert the wrong commit into
your "mybranch".

and then you can cherry-pick all your modification from mybranchBackup

may be you could also been able to rebase upon it....
but I would do an interactive rebase to "see" what's going to do and
being able to control it

like:

git checkout mybranchBackup
git rebase -i mybranch

      reply	other threads:[~2009-11-14  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14  0:30 Resolving a merge conflict with git-svn Jens Kubieziel
2009-11-14  0:58 ` Daniele Segato [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=1258160291.6082.42.camel@localhost \
    --to=daniele.bilug@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kubieziel@googlemail.com \
    /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).