0

After running git push production master i got these error.

error: src refspec master does not match any.

error: failed to push some refs to 'ssh://root@xxx.xxx.xxx.xx/var/repo/site.git'

Community
  • 1
  • 1
Sieanghay
  • 35
  • 3
  • 1
    Shouldn't it be `git push origin master` ? – Shravan40 Sep 12 '16 at 04:50
  • 1
    Possible duplicate of [src refspec master does not match any when pushing commits in git](http://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git) – Bijendra Sep 12 '16 at 07:22

2 Answers2

0

Follow the proper way to fix it :

git add .
git commit -m 'initial commit'
git push origin master
msc
  • 33,420
  • 29
  • 119
  • 214
0

Check this link:

You will see how to init git in production server and client manchine, so you can use:

git push production master

https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks

Jose Seie
  • 892
  • 11
  • 12