在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/PHP  Linux  HTML/ git push => error: failed to push som

git push => error: failed to push some refs to

1.正常 git pull 更新項(xiàng)目 修改 提交 推送的時(shí)候報(bào)錯(cuò)
refs/heads/feature-activity affafce3303eca7d3efa75c9e7be516a6807865c refs/heads/feature-activity 067412f9c6c59c1772209c2872bcc7a4a03cf96c
推送失敗,請(qǐng)檢查: git status
error: failed to push some refs to 'git@XXXXXXXXXX/tryitzone.git'
2.百度搜索眾多解決方案 未果
3.思考之后 懷疑可能是本地commit id和正式庫(kù)commit id 不一致導(dǎo)致 提交失敗
4.查看git 命令發(fā)現(xiàn) git fetch ;git pull 區(qū)別
5.解決:

使用git fetch更新 然后git pull =>  修改 =>  git add .  =>  git commit =>  git  push  可以正常提交了
git fetch 從遠(yuǎn)程獲取最新版本到本地,不會(huì)自動(dòng)merge 會(huì)更新本地的commit id變成最新的commit id
git pull 從遠(yuǎn)程獲取最新版本并merge到本地 會(huì)將本地庫(kù)更新成遠(yuǎn)程庫(kù)的最新?tīng)顟B(tài) 不會(huì)更新本地的commit id
git pull = git fetch + merge to local

基礎(chǔ)不扎實(shí) (?﹏?)

回答
編輯回答
臭榴蓮

那你都知道了還在問(wèn)什么...

2017年9月11日 21:31