In last hour or so i have modified files
In order to make sure my commit messages line up with the actual change, committed
A with a description. Unfortunately i have not included
ATest into that commit.
Meanwhile, still not committed are
What is the best way to proceed at this point? I’d like to either:
- Revert previous commit without affecting my currently uncommitted files?
- Add another file under the same description to the previous commit?
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.