[Libreoffice] newish to git: howto recover from bad merge?

Wols Lists antlists at youngman.org.uk
Sat Nov 20 06:16:37 PST 2010


On 19/11/10 08:11, Kevin Hunter wrote:
> Hullo List,
>
> It must be something simple, but I'm having a devil of a time
> recovering from a bad merge.  Given my transcript below, how do I
> recover?
>
> It usually happens after I've committed a change to my local
> repository, that I then sent in as a patch.  That patch got applied
> with a slight modification, and then the conflict.
>
> -----
> <snip>
> -----
>
> Any pointers for the uninitiated would be awesome.
>
> Thanks!
>
As a git newbie myself ...

Firstly, I'm slightly surprised no-one suggested merely reverting your
patch. You'll need to look at how to do it - someone pointed me to this
link - http://book.git-scm.com/4_interactive_rebasing.html - which might
help you do that, though this page probably isn't quite the right one.

But I'm guessing all you want to do is get rid of your patch and replace
it with the "official" one - so just dropping your version should do
what you want?


The other thing, I noticed it said "not currently on any branch". Are
you using branches? I forget sometimes, but what I do is checkout a
branch, make a bunch of changes, and submit the patch. Another set of
changes - do another branch. When my changes are merged, bin the branch
I made them on because they're now in master. Unless you're really
beginning to do a load of developing so you can't create each patch-set
on their own branch, that workflow should work well.

Cheers,
Wol


More information about the LibreOffice mailing list