Submit

How to run a diff on unstagged changes?

· OhShitGit · Solving Mistories
$ git diff --staged

Git won't do a diff of files that have been add-ed to your staging area without this flag. File under ¯(ツ)/¯ (yes, this is a feature, not a bug, but it's baffling and non-obvious the first time it happens to you!)

Want to Contribute?

Send me an Email, ping me on Twitter or submit a pull request on Github.

Sign up below to receive updates, tips and more handy tutorials when git screws up. It’s good stuff & I don’t spam.