path: root/Documentation/gitattributes.txt
diff options
authorJunio C Hamano <>2007-12-23 07:14:59 (GMT)
committerJunio C Hamano <>2007-12-23 07:14:59 (GMT)
commit0e545f75169e2c260dfb4445203c23cafdfc76ef (patch)
treee9863c4dbd66a9207e24ac3b8015e4475ed6bfa9 /Documentation/gitattributes.txt
parentcc216827936e40bc2e8886623fd44f55e0674932 (diff)
Documentation: describe 'union' low-level merge driver
Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/gitattributes.txt')
1 files changed, 34 insertions, 3 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 71c7ad7..cc9c7c5 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -322,12 +322,43 @@ String::
requested with "binary".
+Built-in merge drivers
+There are a few built-in low-level merge drivers defined that
+can be asked for via the `merge` attribute.
+ Usual 3-way file level merge for text files. Conflicted
+ regions are marked with conflict markers `<<<<<<<`,
+ `=======` and `>>>>>>>`. The version from your branch
+ appears before the `=======` marker, and the version
+ from the merged branch appears after the `=======`
+ marker.
+ Keep the version from your branch in the work tree, but
+ leave the path in the conflicted state for the user to
+ sort out.
+ Run 3-way file level merge for text files, but take
+ lines from both versions, instead of leaving conflict
+ markers. This tends to leave the added lines in the
+ resulting file in random order and the user should
+ verify the result. Do not use this if you do not
+ understand the implications.
Defining a custom merge driver
-The definition of a merge driver is done in `gitconfig` not
-`gitattributes` file, so strictly speaking this manual page is a
-wrong place to talk about it. However...
+The definition of a merge driver is done in the `.git/config`
+file, not in the `gitattributes` file, so strictly speaking this
+manual page is a wrong place to talk about it. However...
To define a custom merge driver `filfre`, add a section to your
`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this: