How can I unstage my files again after making a local commit?
git reset –soft HEAD~1 should do what you want. After this, you’ll have the first changes in the index (visible with git diff –cached), and your newest changes not staged. git status will then look like this: You can then do git add foo.java and commit both changes at once.