DEV Community

Discussion on: Master Git in 7 minutes

Collapse
 
spha88 profile image
Siphamandla Mehlomakulu

Thank for this amazing article, could you please help me with one more issue.

How do I add changes made after a commit to the last commit. For example, I just created a nav menu and committed, after which I made a small change which I don't want to commit on its own but to add to the last commit.

Hope you understand and thank you in advance.

Collapse
 
valeriavg profile image
Valeria

Sure thing! Firstly, you add the changes with git add, then change the last commit with git commit --amend.
If you pushed your commit to the remote repository to push this change you'll need to use git push --force.