Add More Files and Changes to a Commit Before Pushing

InstructorChris Achard

Share this video with your friends

Send Tweet

To add more files to the most recent commit, we can add them to the staging area with:

git add -A

and then rewrite the most recent commit to include them with:

git commit --amend -m "My new message"

Caution: only do this BEFORE you've pushed the commits - otherwise you will be re-writing history for people who may have already pulled down the old commits.