Pick some lines from another branch with git difftool
Imagine you want to take some changes of a different branch into your code.
If you care about the lines of code, not the commits, then you can use the following way to get the changed lines into your code.
Switch to the branch that should be updated.
git difftool other-branch -- your-file.txt
This will open meld and you can take some lines to your local version.
This is related to Restore interactively, but the use case is different:
git restore -p -s other-branch your-file.txt: interactively restore selected hunks fromother-branchgit difftool other-branch -- your-file.txt: inspect another branch side by side and copy over only the lines you want