Tuesday, January 14, 2020

Selectively merge code from another branch


Assume there's a source branch that we want to pick up some code from: branchA and the target branch is branchB


  • Setup meld as difftool:
git config --global diff.tool meld 


  • Check out working branch:
git co branchB


  • Bring up the diff tool: 
git difftool -d branchA..branchB

Note:

  • co is alias for checkout
  • Environment: Linux (Ubuntu)