install p4merge with git

| 分类 Git  | 标签 git  p4 

Reposted from: http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/

Installing and configuring P4Merge for Git on Ubuntu

Geschrieben von Alexander Zeitler am 03. August 2014

Tags: englishp4mergegitubuntu

I’m using P4Merge as Git merge and diff tool on all platforms.
This post describes how to install it on Ubuntu.

In order to set up P4Merge on Ubuntu, copy the extracted P4Merge download to /opt/p4merge:

[~/Downloads/p4merge/p4v-2014.1.888424]$ sudo mv * /opt/p4merge
          

Then symlink p4merge:

sudo ln -s /opt/p4merge/bin/p4merge /usr/local/bin/p4merge
          

After that, add this to your ~/.gitconfig:

[merge]
              keepBackup = false;
              tool = p4merge
              [mergetool]
              prompt = false
              [mergetool "p4merge"]
              cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
              keepTemporaries = false
              trustExitCode = false
              keepBackup = false
              [diff]
              tool = p4merge
              [difftool]
              prompt = false
              [difftool "p4merge"]
              cmd = p4merge "$LOCAL" "$REMOTE"
              keepTemporaries = false
              trustExitCode = false
              keepBackup = false
          

Your next call of git difftool should look like this: P4Merge diff


上一篇     下一篇