Linux笔记之diff工具软件P4merge的使用
code review!
文章目录
- Linux笔记之diff工具软件P4merge的使用
- 1.安装和配置
- 2.使用:p4merge a.cc b.cc
- 3.配置git
参考博文:
Ubuntu Git可视化比较工具 P4Merge 的安装/配置及使用
1.安装和配置
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz$ tar zxvf p4v.tgz$ sudo mkdir /opt/p4v$ cd p4v-2018.2.1666551$ sudo mv * /opt/p4v$ sudo ln -s /opt/p4v/bin/p4merge /usr/local/bin/p4merge
2.使用:p4merge a.cc b.cc
3.配置git
在~/.gitconfig文件的末尾追加以下内容
[merge]keepBackup = falsetool = p4merge
[mergetool]prompt = false
[mergetool "p4merge"]cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"keepTemporaries = falsetrustExitCode = falsekeepBackup = false
[diff]tool = p4merge
[difftool]prompt = false
[difftool "p4merge"]cmd = p4merge "$LOCAL" "$REMOTE"keepTemporaries = falsetrustExitCode = falsekeepBackup = false
使用以下命令启动视图:
git difftool
注意不是 git diff