views:

160

answers:

1

When using a custom driver for merging in Git what is the full file path of the Git attributes /arguments you pass to the driver?

Ex:

driver = filfre %O %A %B

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

-Tanner

A: 

You can follow the example I posted about How do I tell git to always select my local version for conflicted merges on a specific file?.

That scenario involves a merge driver, which you can tweak to display those three variable.

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 what it returned to 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 instance, it appears to be generating three local temp files, names merge_file_xxx.

VonC