Git 1.8.3 for Windows with BC2.5.3 user configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    Git 1.8.3 for Windows with BC2.5.3 user configuration

    For future reference, a user submitted via email a configuration they successfully used to get BC2 working as a mergetool for Git for Windows.

    Code:
    [merge]
        tool = "bc2"        
    [mergetool]
        prompt = false      
    [mergetool "bc2"]       
        cmd = FULLMERGEPATH=`echo ${PWD}/${MERGED} | sed 's/\\\\/c/C:/' | sed 's/\\\\//\\\\\\/g'`; 'C:/Program Files (x86)/Beyond Compare 2/BC2.exe' ${LOCAL} ${REMOTE} /mergeoutput=${FULLMERGEPATH}"
    The “cmd” command is taking the current directory, pre-pending it to the MERGED file, and converts the path to a Windows format (C:\...\...\filename instead of /c/…/…/filename), and then passes it to Beyond Compare. The large number of escaped backslashes are necessary because apparently the process of executing this command expands the string three times (once when the full string is executed, again by expanding the command string to set FULLMERGEPATH, and finally when FULLMERGEPATH is written to mergeoutput and executed by bash). Seems a bit silly, but I can’t find a simpler solution.
    Git's Diff and Merge tool configuration and support is continually in flux as updates are made to the program. Please be sure to verify with test data to avoid altering or deleting any important files.


    *BC3 Pro support is a bit easier to configure. It supports a 3-way Merge:
    http://www.scootersoftware.com/morei...moreinfo_merge
    With configuration found here:
    http://www.scootersoftware.com/suppo...vcs#gitwindows
    BC3's trial is fully featured and available for testing, without the need to remove or alter BC2.
    Aaron P Scooter Software
Working...