Skip to content
Ilya Grigoriev edited this page Jul 10, 2025 · 21 revisions

To integrate GumTree with VCSs, you first have to place the gumtree executable (either gumtree on Linux and Mac OS or gumtree.bat on Windows) in your path.

Git integration

To use GumTree within git you can use the following command :

git difftool -x gumtree webdiff --d (by replacing gumtree by the name of the executable on your system)

You can also set gumtree as the default external diff tool by adding this content in ~/.gitconfig :

[diff]
tool = gumtree

[difftool "gumtree"]
cmd = gumtree webdiff $LOCAL $REMOTE

and then use git difftool -d.

You can also integrate our Docker container with git, see more information on the README of our Dockerfile.

Jujutsu AKA jj

For jj, I had luck with the following config in MacOS/ARM.

Docker

[merge-tools.gumtree-docker]
program="docker"
diff-args = ["run", "--platform", "linux/amd64", "-v", "./$left:/diff/left", "-v", "./$right:/diff/right",
             "--rm", "-p", "4567:4567", "gumtreediff/gumtree", "webdiff", "left/", "right/",]

Then, you can do e.g. jj diff --tool gumtree-docker.

Notes:

  • On the first run, it will take a while to load the 1GB+ image. If a pager is interfering with the process, try waiting, or try jj diff --tool gumtree-docker --no-pager.
  • There is currently no linux/arm image, unfortunately (https://github.com/GumTreeDiff/gumtree/issues/390). My experiment used https://orbstack.dev/ for running an Linux/amd64 image on Darwin/ARM, which worked fine. I have not tested this on Docker Desktop or Colima (but hopefully it works the same, please edit this if you test it!).
  • For debugging, use jj diff --tool gumtree-docker --debug to see what jj is running. You may want to remove --rm from the docs passed to docker in the config. You can start a debug shell by following the instructions in the Docker instructions. Omitting or changing the port forwarding argument from those instructions may help if jj's instance of gumtree is also running.
  • These instructions assume jj 0.30+ with the default value of the diff-do-chdir setting.

Non-Docker

TODO

Clone this wiki locally