다른 건 몰라도, Git 에 기본으로 연결된 편집기랑 비교 병합 툴은 정말 거지 같다.
너무 불편하다.
그래서 대개가 외부 툴을 끌어다 쓴느데,
그 중에 perforce 중 일부인 p4merge를 연동하는 방법이다. 찾는데 좀 애먹었다.
# configure git
git config --global diff.tool p4merge
git config --global difftool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
git config --global difftool.prompt false
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
git config --global mergetool.prompt false
# disable unwanted orig files
git config --global mergetool.keepBackup false
# test
git difftool HEAD^ HEAD
p4merge는 아래에서 받으면 된다.
https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge
Diff Tools and P4 Merge | Perforce Software
P4 Merge for Perforce P4 (formerly Helix Core) tracks and compares the effects of past and pending work for branches and individual files. This free side-by-side file comparison tool is used and loved by developers and designers to visualize merges, obtain
www.perforce.com
회사에서도 쓰는 툴이라서 익숙하고, 아무리 생각해도 이것만큼 편한 건 흔치 않다.