Posted over 9 years ago. Visible to the public.

Git: Diff staged changes

Saying git diff only shows unstaged changes against HEAD (or any hash or branch you supplied) but leaves out files you already staged for the next commit.

To diff your added changes, say:

git diff --cached

Effectively, this gives you the changes you will commit when you run git commit without the -a switch.

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Arne Hartherz
Last edit:
about 9 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more