将本地文件推送到现有的GitHub远程仓库

时间:2017-09-08 15:40:14

标签: github

尝试将已提交的文件推送到GitHub上的现有远程存储库。 下面我验证了,我试图推送到Django。我已经尝试过git push,并且git push -u Django master。任何帮助,将不胜感激。我一直在本地保存我的所有文件,现在我正在将所有文件添加到GitHub中,这有点令人困惑。

Roberts-MBP:Django robertamato$ git remote -v
Django  https://github.com/CodingDojo-Python-09-04/Robert_Amato.git (fetch)
Django  https://github.com/CodingDojo-Python-09-04/Robert_Amato.git (push)
origin  https://github.com/CodingDojo-Python-09-04/RobertAmato (fetch)
origin  https://github.com/CodingDojo-Python-09-04/RobertAmato (push)
Roberts-MBP:Django robertamato$ 

这是一个错误代码,我认为它建议首先获取,但我不熟悉该过程的工作原理。

Roberts-MBP:Django robertamato$ git push -u Django master
To https://github.com/CodingDojo-Python-09-04/Robert_Amato.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/CodingDojo-Python-09-04/Robert_Amato.git'
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.

0 个答案:

没有答案