原先已经提交过git,后来把.git文件夹删除了。现在重新提交gitpush-uoriginmaster一直提交不了!gitpull了很多遍也是一样。Administrator@PC-20140703LOZL/D/PC/pc_ppgame(master)$gitstatusnbranchmasternothingtocommit,workingdirectoryclean/D/PC/game(master)gitpush-uoriginarning:push.defaultisunset;itsimplicitvalueischanginginGit2.0from'matching'to'simple'.Tosquelchthismessageandmaintainthecurrentbehaviorafterthedefaultchanges,use:gitconfig--globalpush.defaultmatchingTosquelchthismessageandadoptthenewbehaviornow,use:gitconfig--globalpush.defaultsimpleWhenpush.defaultissetto'matching',gitwillpushlocalbranchestotheremotebranchesthatalreadyexistwiththesamename.InGit2.0,Gitwilldefaulttothemoreconservative'simple'behavior,whichonlypushesthecurrentbranchtothecorrespondingremotebranchthat'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:Updateswererejectedbecausetheremotecontainsworkthatyoudohint:nothavelocally.Thisisusuallycausedbyanotherrepositorypushinghint:tothesameref.Youmaywanttofirstintegratetheremotechangeshint:(e.g.,'gitpull...')beforepushingagain.hint:Seethe'Noteaboutfast-forwards'in'gitpush--help'fordetails./D/PC/game(master)gitstatusnbranchmasternothingtocommit,workingdirectoryclean/D/PC/game(master)gitpull-uoriginwarning:nocommoncommitsOZLremote: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/masterTherearenocandidatesformergingamongtherefsthatyoujustfetched./D/PC/game(master)gitstatusnbranchmasterUntrackedfiles:(use"gitadd..."toincludeinwhatwillbecommitted)/D/PC/game(master)gitpush-uoriginmasterogit@bitbucket.org:dft/ppgame.git![rejected]master->master(non-fast-forward)error:failedtopushsomerefsto'git@bitbucket.org:dft/ppgame.git'hint:Updateswererejectedbecausethetipofyourcurrentbranchisbehindhint:itsremotecounterpart.Integratetheremotechanges(e.g.hint:'gitpull...')beforepushingagain.hint:Seethe'Noteaboutfast-forwards'in'gitpush--help'fordetails.
2 回答
森林海
TA贡献2011条经验 获得超2个赞
因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在gitpull,这句代码是在git2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories假如我们的源是origin,分支是master,那么我们需要这样写gitpulloriginmaster----allow-unrelated-histories需要知道,我们的源可以是本地的路径
添加回答
举报
0/150
提交
取消