Home ›
See what's about to be committed when using git, and remove something before committingSee what's about to be committed when using git, and remove something before committing
Submitted by Benjamin Melançon on August 27, 2010 - 7:04pm
git diff of files that have been staged ie 'git add'ed
git diff --cached
http://www.commandlinefu.com/commands/view/1242/git-diff-of-files-that-have-been-staged-ie-git-added
$ git commit ...
$ git reset --soft HEAD^ (1)
$ edit (2)
And just commit again.
http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
git revert could have worked, but the working copy must be clean (git stash should have been able to do that)
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#cleaning-up-history
Searched words:
git see what's about to be committed diff
git diff staged
git remove from staging
git undo commit
git roll back commit
Comments
Post new comment