Quantcast
Channel: Open Data - source control
Viewing all articles
Browse latest Browse all 4

See what's about to be committed when using git, and remove something before committing

0
0
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

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


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images