There's nothing wrong with doing this every now and then, but I've seen repeatedly that people tend to use -am as their only way to make commits, which leads to poorly written/formatted commit messages and committing too many files. Don't overuse!
git commit --amend --no-edit
This combination is very useful, but it can be even better: git config --global alias.fixup commit --amend --no-edit --patch ;)
One personal addition:
git log --decorate --oneline --graph --date-order master@{"4 days ago"}..master
To see the commits of the last 4 days in a compact graph :D
Thanks @darkwiiplayer
, I really appreciated your feedback! 🙃
About the dangerous --all flag you are absolutely right. We should not overuse it! We should all strive towards making smaller commits involving a single functionality, and only then we could use the -a flag safely.
For the other tips you suggested, I edited the original post and added them. 😎 Thank you!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There's nothing wrong with doing this every now and then, but I've seen repeatedly that people tend to use
-am
as their only way to make commits, which leads to poorly written/formatted commit messages and committing too many files. Don't overuse!This combination is very useful, but it can be even better:
git config --global alias.fixup commit --amend --no-edit --patch
;)One personal addition:
git log --decorate --oneline --graph --date-order master@{"4 days ago"}..master
To see the commits of the last 4 days in a compact graph :D
Thanks @darkwiiplayer , I really appreciated your feedback! 🙃
About the dangerous
--all
flag you are absolutely right. We should not overuse it! We should all strive towards making smaller commits involving a single functionality, and only then we could use the-a
flag safely.For the other tips you suggested, I edited the original post and added them. 😎 Thank you!