【发布时间】:2019-08-27 22:45:58
【问题描述】:
您好,我在命令 git push -u origing master 后看到以下错误。有人可以帮忙吗
基本上我只是在尝试以下步骤
1) Go to github.com
2) Make repository called datasciencecoursera
3) Come back to git Bash tool
4) mkdir datasciencecoursera on local pc
5) cd to directory
6) git init
7) touch HelloWorld.md
8) git add HelloWorld.md
9) git commit -m "First comment"
10) git remote add origin https://github.com/adnan2911/datasciencecoursera.git
11) git push -u origin master
但我得到以下错误
adnan@AB-DESKTOP MINGW64 ~/datasciencecoursera (master)
$ git push -u origin master
To https://github.com/adnan2911/datasciencecoursera.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/adnan2911/datasciencecours
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我试图搜索快进但无法理解,因为我对 git 的东西很陌生
【问题讨论】: