- Create 2 files:
one.txt
andtwo.txt
. - Commit both files:
git add -A
andgit commit -m "message"
- Edit
one.txt
and add it to index:git add one.txt
- Delete
two.txt
and add it to index:git rm two.txt
I want to commit only one.txt
, therefore I need to reset two.txt
from index.
How to do it?
git commit one.txt
works, but it is not applicable, because may be 100 files instead one.txt
.