git add myfile.txt
# This will add your file into the to-be-committed list
Quite opposite to this command is,
git reset HEAD myfile.txt # This will undo it.
so, you will be in the previous state. Specified will be again in untracked list (previous state).
It will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.