The commands only git fetch origin someone_elses_branch git checkout someone_elses_branch git difftool main.HEAD # 3 dots, NOT 2!.GitHub will show you the commands they recommend for checking out their branch when looking online at the PR. If this is not the case, you'll have to slightly modify the commands to check out from their forked repo instead of from your common repo. NB: the below commands assume their branch is in your same code repo, since you are teammates. Calling meld directly to compare two files: meld path/to/file1.txt path/to/file2.txt To review someone else's GitHub PR locally on your machine, using meld See changes you've made since your last commit (do this in place of # `git diff`) git difftool # 2. That's it! git difftool now works on Linux Ubuntu! 3. edit your ~/.gitconfig file (gedit GUI editor will open) gedit ~/.gitconfig
#Windows install meld update#
install meld sudo apt update sudo apt install meld # 2.
I might as well put the Linux instructions here too for my own reference in one place if nothing else:įor Linux it's even easier: # 1. Now call git difftool in your Git for Windows bash terminal and Meld will open up as your default difftool viewer! If you don't already know: you can open said terminal in Windows by right-clicking in a folder in Windows Explorer and going to -> "Git Bash" or whatever it's called. OR you can just edit your C:\Users\YOUR_USER_NAME\.gitconfig file directly and add the following to the end of it (notice the mandatory usage of the double-backslashes here as the path separator!): tool = meld path = C:\\Program Files (x86)\\Meld\\Meld.exe Then, to make meld your git difftool, you can use these two commands, inside the Git for Windows bash terminal, ( as Arugin says), using the proper path to Meld.exe: git config -global merge.tool meld git config -global "C:\Program Files (x86)\Meld\Meld.exe" Windows:ĭownload and install Git for Windows, which includes a "Git Bash" Linux-like terminal accessible via the right-click menu in any folder in Windows Explorer, once you've installed Git for Windows.
#Windows install meld how to#
How to use meld as your git difftool in place of git diff (see also the screenshots of meld below): 1.