re: Git hacks you should know about VIEW POST

FULL DISCUSSION
 

git commit --amend will add anything in the staging area (or index; the thing files get to when using git add), and let you change the commit message. If you only want to change the commit message leaving the index alone, you can use git commit --amend --only.

When you want to remove a file from the latest commit, after using git reset --soft and co. you can use git commit -C ORIG_HEAD so you don't have to enter the same commit message.

 
code of conduct - report abuse