但是我有一个从heroku创建的Java应用程序。我对其进行了修改,并将其与私有bitbucket存储库相关联。
当我使用heroku eclipse插件执行推送(提交,然后推送到上游)或使用git push heroku master
本地计算机上源代码目录中的命令执行推送时,它将在我的私有存储库中更新我的源代码。
很好,但是当我用heroku run bash --app myapplication
命令查看部署在heroku环境中的代码时,我发现我的代码没有更新。
我的代码与我的私有存储库关联良好,但是heroku不会使用它来更新其源代码。有什么想法可能是错误的吗?谢谢 !
看来您的heroku
遥控器实际上是指向BitBucket的。这是我的建议:
将您现有的heroku
遥控器重命名为origin
。这是“主”遥控器的传统名称,但是如果您愿意,可以调用它bitbucket
或其他名称。
git remote rename heroku origin
现在添加一个新遥控器heroku
,该遥控器实际上指向Heroku。
git remote add heroku [email protected]:your-repository-name.git
您现在应该有两个遥控器。如果运行,git remote -v
您将看到类似以下内容:
heroku [email protected]:your-repository-name.git (fetch)
heroku [email protected]:your-repository-name.git (push)
origin [email protected]:you/your-repository-name.git (fetch)
origin [email protected]:you/your-repository-name.git (push)
现在,您应该可以使用推送到Herokugit push heroku
和推送到BitBucket git push origin
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句