Heroku - git推

时间:2016-06-14 08:05:46

标签: heroku

任何人都可以解释这些问题吗?

mhsjaber:~/workspace/newsite (master) $ heroku keys:add
? Which SSH key would you like to upload? /home/ubuntu/.ssh/id_rsa.pub
Uploading /home/ubuntu/.ssh/id_rsa.pub SSH key... done

mhsjaber:~/workspace/newsite (master) $ heroku create
Creating app... done, ⬢ ancient-island-20017
https://ancient-island-20017.herokuapp.com/ | https://git.heroku.com/ancient-island-20017.git

mhsjaber:~/workspace/newsite (master) $ git push heroku
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date

1 个答案:

答案 0 :(得分:0)

您必须先添加一些内容才能推送到heroku服务器。由于您的存储库已经在heroku上创建,因此您必须在其上添加您的应用程序,以便按照以下步骤进行操作。

(1)heroku login

(2)git init

(3)git add .

(4)git commit -am "comment"

(5)git push heroku master

在你的情况下,你通过不在git push命令中添加master来混淆heroku。