我想推动我正在对其远程分支工作的分支。我得到的消息:Git,Git拉和转义
error: failed to push some refs to 'website.git'
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.
我跑git pull origin
和得到的消息:
you asked to pull from the remote 'origin', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
当运行git push origin branch_name
我得到了同样的错误如上,所以我跑了git pull origin master
。
我有一种感觉,这是不是做我想要的,现在想逃避/中止最后的命令莫名其妙。我目前的屏幕显示如下:
From website.com
* branch master -> FETCH_HEAD
Auto-merging config/routes.rb
Merge branch 'master' of website into branch
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
~
~
~
~
-- INSERT --
对不起,我对git很新。任何人都可以向我解释如何逃避这个当前的屏幕以及它在寻找什么?
这与Ruby没有任何关系,所以我删除了标记。 –
如果您想“逃避”,请阅读最后一条注释行 - 然后删除缓冲区中的所有内容并保存; 'git'会注意到这个空文件,并为你中止合并。 – twalberg