Changes between Version 6 and Version 7 of GitCreateBundle


Ignore:
Timestamp:
Oct 18, 2013, 1:12:55 PM (11 years ago)
Author:
Piero Campalani
Comment:

add section on conflicts and diff3 style

Legend:

Unmodified
Added
Removed
Modified
  • GitCreateBundle

    v6 v7  
    44
    55== Why git bundles ==
     6
     7MERGE BRANCHES VIA PATCH MANAGER.
    68
    79Currently, the repo is folded into different public branches, letting a contributor choose on which of these branch his new patch is meant to be applied (see [RasdamanReleaseProcess#Branchingmodel here] for details).
     
    6466  release_8.5
    6567$ git merge feature_X --no-ff
    66 # In case of "Automatic merge failed; fix conflicts and then commit the result.", then see you later.
     68# ..and we assume there is no conflict, see
    6769
    6870# Check:
     
    180182}}}
    181183
     184== Fixing conflicts ==
     185
     186During a merge, you can often stumble upon one, two or several thousands of conflicts:
     187
     188{{{
     189#!sh
     190$ git merge feature_X
     191...
     192Automatic merge failed; fix conflicts and then commit the result.
     193}}}
     194
     195In this case I would first suggest to configure `git` to present the conflicts with the so-called `diff3` style ([http://stackoverflow.com/questions/161813/how-do-i-fix-merge-conflicts-in-git thanks CoolAJ86]), which is:
     196
     197{{{
     198<<<<<<<
     199Changes made on the branch that is being merged into. In most cases,
     200this is the branch that I have currently checked out (i.e. HEAD).
     201|||||||
     202The common ancestor version.
     203=======
     204Changes made on the branch that is being merged in. This is often a
     205feature/topic branch.
     206>>>>>>>
     207}}}
     208
     209It ''really'' helps you better understand the conflicts.
     210You can configure it with:
     211
     212{{{
     213#!sh
     214$ git merge --abort
     215$ git config merge.conflictstyle diff3
     216}}}
     217
     218Then, [http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts as usual], fix conflicts, and commit:
     219
     220{{{
     221$ git merge
     222...
     223Auto-merging Makefile.am
     224CONFLICT (content): Merge conflict in Makefile.am
     225Automatic merge failed; fix conflicts and then commit the result.
     226$ vim Makefile.am
     227...fix...
     228$ git add Makefile.am
     229$ git commit
     230}}}
     231
     232...and now you can proceed with the [wiki:GitCreateBundle#Creatingandsubmittingabundle bundle].
    182233
    183234== Further reading ==