与GitHub同步的问题

时间:2016-07-21 22:27:17

标签: github

我正在尝试将数据推送到远程仓库。继续围成一圈。 我认为我犯了一个小错误,阻碍了我。

p@LAPTOP-O5L8LHSL MINGW64 ~/DataScience (master)
$ git push --set-upstream origin master
To https://github.com/adkin1988/datasciencecoursera.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/adkin1988/datasciencecoursera.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.

hp@LAPTOP-O5L8LHSL MINGW64 ~/DataScience (master)
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

1 个答案:

答案 0 :(得分:0)

您需要定义哪个远程分支与您当前的本地分支相关。看到你粘贴的代码的最后一行