初学者:我试图在系统要求将我的新文件“推送”到 GitHub 之前进行“拉取”。当我打字时,git push它显示给我:
Merge branch 'master' of https://github.com/Wordworth/Test2
# 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 --
Run Code Online (Sandbox Code Playgroud)
怎么办?目标是在提交到 GitHub 存储库后推送我的文件,该存储库已存在同名本地存储库。任何提示?
这是正常行为。它将远程内容与您的本地内容合并。保存此提交消息,拉取将完成。然后发出你的推送。
git pull 在幕后做两件事 - 首先,从远程仓库中提取所有内容,然后将当前分支的远程内容与本地内容合并。
您看到的该文件是提交合并结果的建议消息。