Skip to content

Instantly share code, notes, and snippets.

@codfish
Last active December 21, 2015 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codfish/6217708 to your computer and use it in GitHub Desktop.
Save codfish/6217708 to your computer and use it in GitHub Desktop.
Compare Git Branches, Compare Two Files in Different Branches
# http://blog.firsthand.ca/2011/05/compare-git-branches-compare-two-files.html
# diff two branches
$ git diff --name-status branch1..branch2
# diff of a specific file between two commits/branchs
$ git diff feature-branch master -- myfile.css
$ git diff eaa241d 4d49814 -- myfile.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment