Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Pew Pew Laser Blog Archives — by Blog ID

Git Diff.


Here are some useful git diff commands:

git diff --name-only
Show names of files that are different between the index (your watched files) and your last commit. Or, pass in two hashes to compare files from those two hashes.
git diff master --name-only
Show all files changed between master and your current working directory. This is great for reviewing changes you'll be making when you merge to master.
git show --name-only [sha]
Show the commit log, and which files have changed in a given hash.
git diff master [filename]
Show the differences between the working directory and master for the file specified.


Tags: git

Authorized users may log-in to leave a comment.

Last Blog: Whiteboard Interviews.

Next Blog: What I Didn't Have To Do.