1、error: failed to push some refs to 'git@github.com:XXXX/XXXX'

hint:Updateswererejectedbecausetheremotecontainsworkthatyoudohint:nothavelocally.Thisisusuallycausedbyanotherrepositorypushinghint:tothesameref.Youmaywanttofirstintegratetheremotechangeshint:(e.g.,'gitpull...')beforepushingagain.hint:Seethe'Noteaboutfast-forwards'in'gitpush--help'fordetails.

#解决方法:gitpull--rebaseoriginmastergitpushoriginmaster2、Your local changes to the following files would be overwritten by merge

error:Yourlocalchangestothefollowingfileswouldbeoverwrittenbymerge:protected/config/main.phpPlease,commityourchangesorstashthembeforeyoucanmerge.

#解决方法:如果希望保留生产服务器上所做的改动,仅仅并入新配置项,处理方法如下:gitstashgitpullgitstashpop然后可以使用gitdiff-w+文件名来确认代码自动合并的情况.反过来,如果希望用代码库中的文件完全覆盖本地工作版本.方法如下:gitreset--hardgitpull其中gitreset是针对版本,如果想针对文件回退本地修改,使用gitcheckoutHEADfile/to/restore3、Pull is not possible because you have unmerged files

Pullisnotpossiblebecauseyouhaveunmergedfiles.Please,fixthemupintheworktree,andthenuse'gitadd/rm<file>'asappropriatetomarkresolution,oruse'gitcommit-a'.

#解决方法:查看冲突文件1、gitstatus也可以告诉我们冲突的文件;Unmergedpaths:(use"gitadd<file>..."tomarkresolution)bothmodified:file2、手动解决冲突,然后提交更改:vifilegitaddfilegitcommit-m'解决冲突'4、CONFLICT (content):Merge conflict in readme.txt

$gitmergefeature1Auto-mergingreadme.txtCONFLICT(content):Mergeconflictinreadme.txtAutomaticmergefailed;fixconflictsandthencommittheresult.

#解决方法:1、gitstatus也可以告诉我们冲突的文件;#bothmodified:readme.txt#冲突文件为readme.txt2、查看readme.txt的内容:<<<<<<<HEADmaster=======fenzhi>>>>>>>feature1Git用<<<<<<<,=======,>>>>>>>标记出不同分支的内容,我们修改如下后保存:masterandfenzhi3、再提交:$gitaddreadme.txt$gitcommit-m"hebing"5、The branch 'feature-vulcan' is not fully merged.

error:Thebranch'feature-vulcan'isnotfullymerged.Ifyouaresureyouwanttodeleteit,run'gitbranch-Dfeature-vulcan'.

#解决方法:强行删除,需要使用命令:gitbranch-Dfeature-vulcan。6、Please move or remove them before you can merge. Aborting

#解决方法:gitclean-d-fx""其中x-----删除忽略文件已经对git来说不识别的文件d-----删除未被添加到git的路径中的文件f-----强制运行