首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将本地git存储库推送到OpenShift存储库

问将本地git存储库推送到OpenShift存储库
EN

Stack Overflow用户
提问于 2015-04-11 19:59:25
回答 1查看 360关注 0票数 1

我在将我自己的项目推向我的openshift源代码时遇到了麻烦。

当我在我本地的项目主分支中时,我用我的openshift源代码创建了一个远程openshift存储库:

代码语言:javascript
复制
git remote add openshift [ssh://....@nodejs-<app_name>.rhcloud.com/~/git/nodejs.git/

然后:

代码语言:javascript
复制
git push openshift master

我得到了:

代码语言:javascript
复制
To ssh://..../~/git/nodejs.git/
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://....nodejs.git/'

hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我想我需要先拉,就像提示所说的那样,但它会超过我想要推送到那里的源码

EN

回答 1

Stack Overflow用户

发布于 2015-04-11 20:02:27

首先执行git pull,然后执行git push。

它已经在说-

代码语言:javascript
复制
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29577621

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档