Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在做了git push heroku master之后,我们应该做git push origin master吗_Git_Github - Fatal编程技术网

在做了git push heroku master之后,我们应该做git push origin master吗

在做了git push heroku master之后,我们应该做git push origin master吗,git,github,Git,Github,我问这个问题是因为我的提交在执行git-push-heroku-master之后没有显示在github中,但在执行git-push-origin-master之后显示,以下命令将为您提供: git remote -v heroku https://git.heroku.com/MY_PROJECT.git (fetch) heroku https://git.heroku.com/MY_PROJECT.git (push) origin git@github.com:<name&g

我问这个问题是因为我的提交在执行
git-push-heroku-master
之后没有显示在github中,但在执行
git-push-origin-master

之后显示,以下命令将为您提供:

git remote -v

heroku  https://git.heroku.com/MY_PROJECT.git (fetch)
heroku  https://git.heroku.com/MY_PROJECT.git (push)
origin  git@github.com:<name>/MY_PROJECT.git (fetch)
origin  git@github.com:<name>/MY_PROJECT.git (push)
git远程-v
赫罗库https://git.heroku.com/MY_PROJECT.git (取回)
赫罗库https://git.heroku.com/MY_PROJECT.git (推)
起源git@github.com:/MY_PROJECT.git(获取)
起源git@github.com:/MY_PROJECT.git(推送)
这意味着您有两个独立的远程设备(意味着在不同的地方有不同的存储库)。GitHub上有一个远程(
源站
)。另一个(
heroku
)在heroku的服务器上

因此,如果您将代码推送到heroku git存储库,通过git push heroku master将代码发布到heroku,这是非常合理的。Heroku和GitHub不在一起,因此它们需要单独更新,正如您通过两个单独的push命令发现的那样

请记住,
gitpush
的一般格式是->
gitpush