I want to add a file to git from terminal.
Like answer to the question below, I want to create
You can do this by installing
git-extras from https://github.com/tj/git-extras/blob/master/Installation.md
One of the commands this adds is
git touch and as documented here and this does exactly what you wish:
Call touch on the given file and add it to the current index. Used one-step creating new files.
Here it is in action: