Suppose there are two branches, masterand slave, and they are editing the same file and one line. Original file contents
foo bar
then in the branches slaveit is edited to become
foo bar baz
Now the branch user slaveformats the patch ( git format-patch master) and sends it to the branch user master. At the same time, in the branch, masterthe same file is edited and becomes
foo bar spam eggs
The patch cannot be applied, but masterrequests slaveto merge and create a new patch. When mastermerged in slave, and the conflict is resolved, the reformatting time of the patch. The fixation chart looks like this:
slave: master:
foo bar baz spam eggs
| \
| \
| foo bar spam eggs
| |
foo bar baz |
\ |
\ |
+--------- foo bar
The last commit (merge) on is slaveas follows:
@@@ -1,1 -1,1 +1,1 @@@
- foo bar baz
-foo bar spam eggs
++foo bar baz spam eggs
, git format-patch master, - , , :
@@ -1 +1 @@
-foo bar
+foo bar baz
, ? rebase.
: git format rev1..rev2, rev1 rev2 master custom , , . git-diff , .