0

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

Community
  • 1
  • 1
Bye
  • 732
  • 8
  • 29

2 Answers2

1

Try

touch config/database.yml

instead of

git touch config/database.yml
Deepak
  • 850
  • 5
  • 13
1

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:

enter image description here

Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91