In this section, you will raise your skills by learning some techniques that will come in handy in different situations.
This trick is for people who don't double-check what they're writing. If you pressed the Enter key too early, there's a way to modify the last commit message, using the
git commit command with the
$ git commit --amend -m "New commit message"
Please note that with the
--amend option, you are actually redoing the commit, which will have a new hash; if you already pushed the previous commit, changing the last commit is not recommended; rather, it is deplorable and you will get in trouble.
Working on source code in a team, it is not uncommon ...