We have all been in a situation where we have forgotten one little change, for which we have to make a new commit. When this change is not so huge, we can add it into our last commit using the -—amend flag.
git add .
git commit --amend --no-edit
Using the —-no-edit flag allows us to apply changes to our last commit without modifying the commit message.