git diff feature branch with unstaged changes

To integrate changes from branch “feature1” without cherry picking can be done file by file or line by line.

Compare current unstaged changes file-by-file, with the ability to line-by-line implement changes:

git difftool feature1

Whole branch compare does NOT allow line-by-line edits, so perhaps open a second terminal and “git checkout” files from the feature branch as desired.

git difftool -d feature1

Meld or Visual Studio Code are good GUIs for Git difftool and mergetool. Pick one or the other. Many developers already have Visual Studio Code.

Visual Studio Code: Git difftool and mergetool

Meld is installed by:

  • Linux: apt install meld
  • MacOS: brew install meld
  • Windows

To use meld for git difftool and git mergetool, do one-time configure:

git config --global diff.tool meld
git config --global merge.tool meld