[英]git can't push my updates to remote
$ git log
commit 49a37bc9fd27c909e4fe77812041fd38b9755f61 (HEAD -> master)
Author: chenghuang <574637816@qq.com>
Date: Thu Dec 7 14:15:42 2017 +0900
useless
commit e9b08e2b428f9dd58aa0b792ebeb29da4270dfab
Author: chenghuang <574637816@qq.com>
Date: Tue Dec 5 22:45:31 2017 +0900
20171205_Checklist_well
我只需要在git日志中提交即可。
$ git branch #my current branch is master
* master
$ git remote -v #This is my remote github url
origin https://github.com/ekoopgj/Shell_learning.git (fetch)
origin https://github.com/ekoopgj/Shell_learning.git (push)
$ git push -u origin master
Username for 'https://github.com':
Password for 'https://ekoopgj@github.com':
To https://github.com/ekoopgj/Shell_learning.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/ekoopgj/Shell_learning.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.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我無法將更新推送到remote。 “遠程工作包含您的工作”是什么意思?
完整的句子是
the remote contains work that you do not have locally.
這意味着有人在您之前推動了遠程主服務器。
git pull
(或者更好的是git pull --rebase
)將允許您進行修改,然后將其推回去。
這意味着您的源代碼副本不是最新的,並導致不匹配。 掌握最新信息,可能在其他位置將您的更改與之合並,然后嘗試再次推送
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.