新手git push時出問題 - Linux

Table of Contents

有時候我git add filename,接著commit完之後

要push上去時會出現錯誤訊息:

failed to push some refs to "https://githun.com/......"

To prevent you from losing history, non-fast-forward updates were rejected

Merge the remote changes (e.g. 'git pull') before pushing again.

請問他是要我再pull一遍嗎><? 為何為何~?

git還沒上手Q

--

All Comments

Ethan avatarEthan2014-05-21
應該是push上去前要先下pull或pull --rebase
Anthony avatarAnthony2014-05-22
已經clone下來了還要pull嗎?
Yedda avatarYedda2014-05-22
你要push到remote的repo就要先pull其他人的commit來看有沒有
conflict或有沒有要merge
Andrew avatarAndrew2014-05-23
clone是clone那當下的repo狀態,還是得要下pull來sync
Gary avatarGary2014-05-25
意思是我clone下來的是舊版本 必須再pull一遍檢查有沒有
conflict囉?
Joe avatarJoe2014-05-29
應該是從你clone/pull到你要push時有其他人也push了,你就要
先拉他的部份下來,才能再push
Sierra Rose avatarSierra Rose2014-06-01
fetch/merge
Noah avatarNoah2014-06-05
直接拉下來豪空步
Yuri avatarYuri2014-06-10
也是..最近有看到這樣的討論,才驚覺我的操作帶著svn的習慣..