9

任何帮助都会很棒。提前致谢!

我已经安装了 git,并且设置了 ssh 密钥,但是我遇到了这个奇怪的错误。

admin@Administrators-MacBook-Pro:~/Desktop$ cd exercise/
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ git init
Initialized empty Git repository in /Users/admin/Desktop/exercise/.git/
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ git remote add origin git@github.com:pavankat/exercise.git
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'git@github.com:pavankat/exercise.git'
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ git push git@github.com:pavankat/exercise.git HEAD:test
fatal: remote part of refspec is not a valid name in /
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ git push git@github.com:pavankat/exercise.git HEAD:test
error: src refspec HEAD does not match any.
error: failed to push some refs to 'git@github.com:pavankat/exercise.git'
admin@Administrators-MacBook-Pro:~/Desktop/exercise$ 
4

1 回答 1

20

所以我没有做

git add .

git commit -am 'initial commit' 

在我推之前。

:/

于 2013-01-21T19:21:12.770 回答