I have just started learing GIT. Follow their tutorial.
Now at the very beginning I got stuck with this error:
Fatal: pathspec \'file.txt\' did not match
I had the same problem because the file name is already appended with .txt and you are adding an extra .txt explicitly. You can try with this:
git add file.txt.txt