epcim
11/18/2016 - 7:58 AM

git diff branch compare

git diff branch compare



# git diff branches
# https://git-scm.com/docs/git-merge-base

# compare branches
git diff master # while on branch
git diff master..branch

# compare branch since `merge-base`, which is a earliest commit you may find on both branches
git diff master...branch || git diff `git merge-base master branch`..branch


# only files modified, commit msgs
git diff --name-status master..branch
git shortlog master..branch