git push -u origin 一直提示 git pull

原先已经提交过git,后来把.git文件夹删除了。
现在重新提交
gitpush-uoriginmaster
一直提交不了!gitpull了很多遍也是一样。
Administrator@PC-20140703LOZL/D/PC/pc_ppgame(master)
$gitstatus
nbranchmaster
nothingtocommit,workingdirectoryclean
/D/PC/game(master)
gitpush-uorigin
arning:push.defaultisunset;itsimplicitvalueischangingin
Git2.0from'matching'to'simple'.Tosquelchthismessage
andmaintainthecurrentbehaviorafterthedefaultchanges,use:
gitconfig--globalpush.defaultmatching
Tosquelchthismessageandadoptthenewbehaviornow,use:
gitconfig--globalpush.defaultsimple
Whenpush.defaultissetto'matching',gitwillpushlocalbranches
totheremotebranchesthatalreadyexistwiththesamename.
InGit2.0,Gitwilldefaulttothemoreconservative'simple'
behavior,whichonlypushesthecurrentbranchtothecorresponding
remotebranchthat'gitpull'usestoupdatethecurrentbranch.
See'githelpconfig'andsearchfor'push.default'forfurtherinformation.
(the'simple'modewasintroducedinGit1.7.11.Usethesimilarmode
'current'insteadof'simple'ifyousometimesuseolderversionsofGit)
Togit@bitbucket.org:dft/ppgame.git
![rejected]master->master(fetchfirst)
error:failedtopushsomerefsto'git@bitbucket.org:dft/ppgame.git'
hint:Updateswererejectedbecausetheremotecontainsworkthatyoudo
hint:nothavelocally.Thisisusuallycausedbyanotherrepositorypushing
hint:tothesameref.Youmaywanttofirstintegratetheremotechanges
hint:(e.g.,'gitpull...')beforepushingagain.
hint:Seethe'Noteaboutfast-forwards'in'gitpush--help'fordetails.
/D/PC/game(master)
gitstatus
nbranchmaster
nothingtocommit,workingdirectoryclean
/D/PC/game(master)
gitpull-uorigin
warning:nocommoncommitsOZL
remote:Countingobjects:2190,done.
remote:Compressingobjects:100%(1971/1971),done.
remote:Total2190(delta184),reused2171(delta175)
Receivingobjects:100%(2190/2190),27.91MiB|256.00KiB/s,done.
Resolvingdeltas:100%(184/184),done.
Frombitbucket.org:dft/ppgame
*[newbranch]master->origin/master
Therearenocandidatesformergingamongtherefsthatyoujustfetched.
/D/PC/game(master)
gitstatus
nbranchmaster
Untrackedfiles:
(use"gitadd..."toincludeinwhatwillbecommitted)
/D/PC/game(master)
gitpush-uoriginmaster
ogit@bitbucket.org:dft/ppgame.git
![rejected]master->master(non-fast-forward)
error:failedtopushsomerefsto'git@bitbucket.org:dft/ppgame.git'
hint:Updateswererejectedbecausethetipofyourcurrentbranchisbehind
hint:itsremotecounterpart.Integratetheremotechanges(e.g.
hint:'gitpull...')beforepushingagain.
hint:Seethe'Noteaboutfast-forwards'in'gitpush--help'fordetails.
胡子哥哥
浏览 819回答 2
2回答

森林海

因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在gitpull,这句代码是在git2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories假如我们的源是origin,分支是master,那么我们需要这样写gitpulloriginmaster----allow-unrelated-histories需要知道,我们的源可以是本地的路径
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript