git diff tmp file invalid on windows when using external program on Windows 7

后端 未结 3 996
情话喂你
情话喂你 2021-01-14 06:05

I\'m following the docs from the Git configuration page and trying to apply this to my Windows 7 environment. When I run say, \"git diff file0\" I get an error in P4Merge:

3条回答
  •  一个人的身影
    2021-01-14 06:22

    Looks like a mistake in your gitconfig. Have you seen this Stackoverflow question?

    I blogged about setting up P4Merge ages ago before git started supporting it directly but it still works if you are stuck: http://danlimerick.wordpress.com/2011/06/19/git-for-window-tip-use-p4merge-as-mergetool/

    EDIT: To be more explicit, it is the escaping that is your problem. In my .gitconfig file for P4Merge it looks like this:

    cmd = p4merge.exe /\"$BASE/\" /\"$LOCAL/\" /\"$REMOTE/\" /\"$MERGED/\"
    

    So try this:

    cmd = extMerge /\"$BASE/\" /\"$LOCAL/\" /\"$REMOTE/\" /\"$MERGED/\"
    

    There is a difference with escaping if you set it from the command line or make the change directly in your .gitconfig file.

提交回复
热议问题