作者lovelyzon (如今你)
看板Linux
标题[问题] 新手git push时出问题
时间Sat May 17 15:34:56 2014
有时候我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
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.167.143.11
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Linux/M.1400312104.A.983.html
1F:→ soem:应该是push上去前要先下pull或pull --rebase 05/17 15:46
2F:→ lovelyzon:已经clone下来了还要pull吗? 05/17 15:51
3F:→ soem:你要push到remote的repo就要先pull其他人的commit来看有没有 05/17 15:54
4F:→ soem:conflict或有没有要merge 05/17 15:54
5F:→ soem:clone是clone那当下的repo状态,还是得要下pull来sync 05/17 15:55
6F:→ lovelyzon:意思是我clone下来的是旧版本 必须再pull一遍检查有没有 05/17 15:56
7F:→ lovelyzon:conflict罗? 05/17 15:56
8F:推 soem:应该是从你clone/pull到你要push时有其他人也push了,你就要 05/17 16:02
9F:→ soem:先拉他的部份下来,才能再push 05/17 16:02
10F:→ alog:fetch/merge 05/18 07:09
11F:→ alog:直接拉下来豪空步 05/18 07:10
12F:推 soem:也是..最近有看到这样的讨论,才惊觉我的操作带着svn的习惯.. 05/18 10:52