我正试图将我正在工作的分支推送到它的远程分支。但是我一直收到以下信息:
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非常不熟悉。有人可以向我解释一下如何退出当前屏幕以及它要我做什么吗?
git
会注意到空文件并为您中止合并。 - twalberg