Git Combine Driver - File Attributes

When using a custom driver to merge in Git, what is the full path to the Git attribute / argument file that you pass to the driver?

Example:

driver = filfre %O %A %B 

What is the full file path of the three files: %O , %A and %B ?

-Tanner

+4
source share
1 answer

You can follow the example I posted How do I tell git to always select the local version for conflicting merges in a specific file? .

This script uses the merge driver, which you can configure to display these three variables.

 keepmine.sh echo echo origin $1 echo origin content: cat $1 echo echo local $2 echo local content: cat $2 echo echo remote $3 echo remote content: cat $3 exit 0 

Here is what he answered me:

 C:\Prog\Git\tests\CopyMerge>git merge hisBranch origin .merge_file_a08152 origin content: b local .merge_file_b08152 local content: b myLineForB remote .merge_file_c08152 remote content: b hisLineForB 

So, in this case, the generation of three local temp files , the names merge_file_xxx .


As mentioned in BlackEye in the comment, and in BlackEye it says " Git Merge Driver - How to find> commit ef45bb1 (git 2.5, July 2015) the original path to external drivers using %P

+2
source

All Articles