To add a new file to the previous commit:
$ git add new-file
$ git commit --amend
You can use git commit --amend --no-edit if you don’t want to change the commit message.
To add a new file to the previous commit:
$ git add new-file
$ git commit --amend
You can use git commit --amend --no-edit if you don’t want to change the commit message.