$ $ git push --set-upstream origin master // 设置提交的分支 $ git push // 继续推送 To https://git.oschina.net/hxrealm/test.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://git.oschina.net/hxrealm/test.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. $ git pull // 拉取数据 $ git branch --set-upstream-to=origin/master // 设置仓库分支 $ git pull // 继续拉取数据 fatal: refusing to merge unrelated histories // 提示合并pull两个不同的项目