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

Norbert Thiebaud nthiebaud at gmail.com
Fri Nov 19 04:40:28 PST 2010



On Nov 19, 2010, at 0:11, Kevin Hunter <hunteke at earlham.edu> 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.
> 
> -----
> $ cd .../rawbuild/binfilter
> $ git pull -r
> First, rewinding head to replay your work on top of it...
> Applying: EasyHack: RTL macro from createFromAscii
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merging binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
> CONFLICT (content): Merge conflict in binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
> Failed to merge in the changes.
> Patch failed at 0001 EasyHack: RTL macro from createFromAscii
> 
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
> 
> $ vim bf_svx/source/items/svx_xmlcnitm.cxx
>  # AS NORMAL, HERE I MANUALLY FIX THE BAD MERGE
> 
> $ git status
> # Not currently on any branch.
> # Unmerged paths:
> #   (use "git reset HEAD <file>..." to unstage)
> #   (use "git add/rm <file>..." as appropriate to mark resolution)
> #
> #    both modified:      bf_svx/source/items/svx_xmlcnitm.cxx
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> 
> $ git add bf_svx/source/items/svx_xmlcnitm.cxx
> 
> $ git commit
> # Not currently on any branch.
> nothing to commit (working directory clean

Do not commit, let git rebase --continue do that

Norbert
> 
> $ git rebase --continue
> Applying: EasyHack: RTL macro from createFromAscii
> No changes - did you forget to use 'git add'?
> 
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
> -----
> 
> Any pointers for the uninitiated would be awesome.
> 
> Thanks!
> 
> Kevin
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice


More information about the LibreOffice mailing list