Reputation: 768
I want to add a file to git from terminal.
Like answer to the question below, I want to create /home/deploy/myrailsapp/shared/config/database.yml
file manually
But git touch config/database.yml not work for me
Anyone could help? Thanks
Capistrano: linked file database.yml does not exist on my.server.ipadress
Upvotes: 0
Views: 217
Reputation: 18869
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:
DESCRIPTION
Call touch on the given file and add it to the current index. Used one-step creating new files.
Here it is in action:
Upvotes: 1
Reputation: 870
Try
touch config/database.yml
instead of
git touch config/database.yml
Upvotes: 1