Git has additional mergetool config variables. To configure the diff tool Git uses different from the merge tool, similarly configure with the diff.tool setting: git config -global diff.tool p4merge Further Info Git config -global myfavtool_executable $BASE $LOCAL $REMOTE $MERGED Diff Tool Different from Merge Tool Example git config -global merge.tool myfavtool Use these variables in the launch of the merge tool. ![]() In the process spawned to run the specified merge command, Git creates BASE, LOCAL, REMOTE, and MERGED environment variables. The value of this variable is the command to invoke the merge tool (may specify a script for ease). When specifying a merge.tool value not in the supported list, also specify a mergetool.cmd matching variable. It’s free to use, and does not require using the Perforce server or a license, so anyone can use it.Īs an example, to configure it globally for all Git repos, execute: git config -global merge.tool p4merge Other Merge Tools ![]() You can even use it to resolve conflicts (especially with Git). Audience Developers and designers interested in a solution to track and compare individual files About P4Merge P4Merge tracks and compares the effects of past and pending work for branches and individual files. One of my favorite merge tools is by Perforce: P4Merge. P4Merge is available for Windows, Mac and Linux. To configure the git merge tool, use: git config merge.tool Example The Git help lists them, and as of this writing they are: Git supports the easy configuration of many merge tools. Git tells me about the conflict then it asks if I wanna start the mergetool configured (p4merge) and then I get the error above. Some, including Git, allow configuring your favorite merge tool vs forcing use of their own merge tool. Error starting p4merge: 'path/myFile' is (or points to) an invalid file (this lists the BASE, LOCAL, REMOTE, and standard version of the file). To help with merges, source control products have a merge tool. ![]() Git mergetool: Source merging is inevitable with concurrent development.
0 Comments
Leave a Reply. |