Git: correct commit
Bad commit? Too fast?
Add, modify, remove what you must (git add/rm etc.) and then:
$ git commit --amend
This open commit window with last commit message, but when you commit now it will include your later changes.
Written by Lukas Redynk
Related protips
2 Responses
You forgot to mention that the correction must be made before pushing to the repo.
over 1 year ago
·
If you wish to amend and keep the same message and author as before (and skip editing), you can use -C.
git commit --amend -C
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#