Workflow

Note: Really, really should use gitflow or perhaps github-flow:

Test

In praise of git’s index.

To stash the changes you see using git diff, but not the ones you have staged (will leave the code on disk exactly the same as the index).

Use this just before you commit, to run your tests:

git stash --keep-index

After testing (and committing), you apply the stashed changes back into the working copy using:

git stash pop

… continue where you left off.