duhan
Blog

Include New Changes in Your Latest Commit

I often forget to add something to my last commit.

Solution is: git commit --amend --no-edit

Let’s imagine you have made your changes and commited to local repository, but you didn’t push and realized you should have updated the version number. Kindly edit your version number and run:

git add .
git commit --amend --no-edit

Now your updated version number is included in your latest commit.