如何将本地工作空间推送或推送到origin / master

时间:2016-02-03 18:36:37

标签: git github

我在Webstorm中创建了Rebase My Github Fork。在大约一分钟内,我完全得到了我想要的东西,我很高兴终于可以用Git做对了。

现在,经过一个小时的谷歌搜索,合并,变基,创建和转换分支,我觉得我仍然没有接近git接受我的更改并推动原点/主人。

我希望Git再添加两个命令:

git just-tell-me-what-the-problem-is

git just-push-what-is-in-my-local-workspace-to-origin-master

与此同时,有人可以给我一套可靠的步骤来实现这个目标吗?

! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/celestially/mantra-sample-blog-app'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

1 个答案:

答案 0 :(得分:4)

如果将git just-tell-me-what-the-problem-is添加到GIT,它会显示以"提示开头的行:"。

除了告诉问题"当前分支的提示落后于其远程对手" ),它还显示解决方案"在再次推送之前合并远程更改(例如' git pull')。" 并为您提供偶数地点的参考更多信息"请参阅有关快进的说明'在' git push --help'有关详情。"