几周前,我在livebytransit.com上成功地将一个实时应用程序推送到heroku上,并且我已经成功地将代码更改推迟到最近。在从同一工作目录创建暂存应用程序后,我无法推送代码更改...请参阅下午--cloud-6227.herokuapp.com。我的想法是先将变化推向下午 - 云,然后如果一切看起来都很好,请推送到主站点。就目前而言,我无法将更改推送到任一应用程序。
这是一些代码,显示了我尝试过的一些事情。我认为这有很多问题,我最好的办法是创建一个新文件夹,从github克隆应用程序,然后重新部署到heroku上的新应用程序并刻录现有的两个应用程序....但我有一些在这个过程中会被吹走的用户,所以如果可能的话,我想挽救我现有目录中的内容。
TBones-MacBook-Pro:livebytransit PG$ git remote -v
afternoon-cloud-6227 git@heroku.com:afternoon-cloud-6227.herokuapp.git (fetch)
afternoon-cloud-6227 git@heroku.com:afternoon-cloud-6227.herokuapp.git (push)
heroku git@heroku.com:livebytransit.herokuapp.git (fetch)
heroku git@heroku.com:livebytransit.herokuapp.git (push)
orgin git@github.com:tom-brown/LiveByTransit.git (fetch)
orgin git@github.com:tom-brown/LiveByTransit.git (push)
TBones-MacBook-Pro:livebytransit PG$ git add .
TBones-MacBook-Pro:livebytransit PG$ git commit -am"lots of changes that have been pushed to github already via git push orgin master"
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: voting (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
TBones-MacBook-Pro:livebytransit PG$ git push afternoon-cloud-6227
! Invalid path.
! Syntax is: git@heroku.com:<app>.git where <app> is your app's name.
fatal: The remote end hung up unexpectedly
TBones-MacBook-Pro:livebytransit PG$ git push orgin master
Everything up-to-date
TBones-MacBook-Pro:livebytransit PG$ git remote rm afternoon-cloud-6227
TBones-MacBook-Pro:livebytransit PG$ git remote add livebytransit git@heroku.com:livebytransit.herokuapp.git
TBones-MacBook-Pro:livebytransit PG$ git remote -v
heroku git@heroku.com:livebytransit.herokuapp.git (fetch)
heroku git@heroku.com:livebytransit.herokuapp.git (push)
livebytransit git@heroku.com:livebytransit.herokuapp.git (fetch)
livebytransit git@heroku.com:livebytransit.herokuapp.git (push)
orgin git@github.com:tom-brown/LiveByTransit.git (fetch)
orgin git@github.com:tom-brown/LiveByTransit.git (push)
TBones-MacBook-Pro:livebytransit PG$ git add .
TBones-MacBook-Pro:livebytransit PG$ git commit -a -m "lots of changes already commited to github via git push orgin master"
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: voting (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
TBones-MacBook-Pro:livebytransit PG$ git push orgin master
Everything up-to-date
TBones-MacBook-Pro:livebytransit PG$ git push heroku master
! Invalid path.
! Syntax is: git@heroku.com:<app>.git where <app> is your app's name.
fatal: The remote end hung up unexpectedly
TBones-MacBook-Pro:livebytransit PG$ git push heroku livebytransit
! Invalid path.
! Syntax is: git@heroku.com:<app>.git where <app> is your app's name.
fatal: The remote end hung up unexpectedly
TBones-MacBook-Pro:livebytransit PG$ git push heroku git@heroku.com:livebytransit.herokuapp.git
! Invalid path.
! Syntax is: git@heroku.com:<app>.git where <app> is your app's name.
fatal: The remote end hung up unexpectedly
TBones-MacBook-Pro:livebytransit PG$ git push heroku:livebytransit.herokuapp.git
ssh: Could not resolve hostname heroku: nodename nor servname provided, or not known
fatal: The remote end hung up unexpectedly
让我感到困惑的一件事就是为什么原产地拼写错误。这让我想知道我是不是意外地改变了这个?任何想法或建议都将非常感激。
答案 0 :(得分:2)
听起来像你的heroku遥控器是在.git / config。
鉴于您的应用程序位于livebytransit.herokuapp.com,您的heroku远程应该是:
git@heroku.com:livebytransit.git
如果您希望在两个单独的Heroku应用程序中运行相同应用程序的主题分支,我建议您阅读:
http://neilmiddleton.com/deploying-topic-branches-to-heroku/
答案 1 :(得分:0)
尼尔的答案实际上对我有用。我检查了.git / config,发现不知怎的,那里有一个额外的.git,如下所示:
[remote "heroku"]
url = git@heroku.com:jon-demo-app.git.git
fetch = +refs/heads/*:refs/remotes/heroku/*
我将jon-demo-app.git.git更改为jon-demo-app.git并且是金色的。