2

我在 Heroku 上部署 Django 应用程序时遇到问题。git push 后家里什么都没有。我不认为问题出在 git 上,因为我可以推送到 github 上的存储库。

(23:43:01 (venv)user@host ~/path $ git push heroku 4heroku
Everything up-to-date
(23:43:31 (venv)user@host ~/path $ heroku run bash
Running `bash` attached to terminal... up, run.3486
~ $ ls
~ $ ls -la
total 8
drwx------  2 u12545 12545 4096 Mar 26 23:44 .
drwxr-xr-x 15 root   root  4096 Oct 31  2011 ..
~ $ exit
(23:44:16 (venv)user@host ~/path $ heroku logs
......
2013-03-26T23:34:04+00:00 heroku[api]: Starting process with command `bash` by email@yahoo.co.uk
2013-03-26T23:34:05+00:00 heroku[run.8328]: Awaiting client
2013-03-26T23:34:05+00:00 heroku[run.8328]: Starting process with command `bash`
2013-03-26T23:34:06+00:00 heroku[run.8328]: State changed from starting to up
2013-03-26T23:34:39+00:00 heroku[run.8328]: Client connection closed. Sending SIGHUP to all processes
2013-03-26T23:34:40+00:00 heroku[run.8328]: State changed from up to complete
2013-03-26T23:34:40+00:00 heroku[run.8328]: Process exited with status 0
2013-03-26T23:44:00+00:00 heroku[api]: Starting process with command `bash` by email@yahoo.co.uk
2013-03-26T23:44:02+00:00 heroku[run.3486]: Starting process with command `bash`
2013-03-26T23:44:02+00:00 heroku[run.3486]: Awaiting client
2013-03-26T23:44:02+00:00 heroku[run.3486]: State changed from starting to up
2013-03-26T23:44:16+00:00 heroku[run.3486]: Process exited with status 0
4

1 回答 1

2

如果要部署不是该master分支的分支,则应该执行不同的推送。根据Heroku 文档

此命令将忽略推送到除 master 之外的 Heroku 的分支。如果您正在本地处理另一个分支,您可以在推送之前合并到 master,或者指定您要将本地分支推送到远程 master。要推送除 master 以外的分支,请使用以下语法:

$ git push heroku yourbranch:master
于 2013-03-27T00:09:14.773 回答