Resolve conflicts · Merge requests · Project · User ... - ETSI Labs

文章推薦指數: 80 %
投票人數:10人

NOTE: GitLab resolves conflicts by creating a merge commit in the source branch that is not automatically merged into the target branch. The merge commit can be ... Help Help Mergerequestconflictresolution(FREE) Mergeconflictsoccurwhentwobrancheshavedifferentchangesthatcannotbe mergedautomatically. Gitcanmergechangesbetweenbranchesinmostcases,but occasionallyGitrequiresyourassistancetoresolvethe conflictsmanually.Typically,thisisnecessarywhenpeoplechangethesame partsofthesamefiles. GitLabpreventsmergerequestsfrombeingmergeduntilallconflictsare resolved.Conflictscanberesolvedlocally,orinmanycasesinGitLab (seeconflictsavailableforresolution forinformationonwhenthisisavailable). NOTE: GitLabresolvesconflictsbycreatingamergecommitinthesourcebranchthat isnotautomaticallymergedintothetargetbranch.Themerge commitcanbereviewedandtestedbeforethechangesaremerged.Thisprevents unintendedchangesenteringthetargetbranchwithoutrevieworbreakingthe build. Resolveconflicts:interactivemode ClickingResolveConflictsdisplaysalistoffileswithconflicts,withconflictsections highlighted: Afterallconflictshavebeenmarkedasusing'ours'or'theirs',theconflict canberesolved.Resolvingconflictsmergesthetargetbranchofthemerge requestintothesourcebranch,usingtheoptions chosen.Ifthesourcebranchisfeatureandthetargetbranchismain, thisissimilartoperforminggitcheckoutfeature;gitmergemainlocally. Resolveconflicts:inlineeditor Somemergeconflictsaremorecomplex,requiringyoutomanuallymodifyafileto resolvethem.Usethemergeconflictresolutioneditortoresolvecomplex conflictsintheGitLabinterface.ClickEditinlinetoopentheeditor. Afteryou'resureaboutyourchanges,clickCommittosourcebranch. Conflictsavailableforresolution GitLaballowsresolvingconflictsinafilewhereallofthebelowaretrue: Thefileistext,notbinary ThefileisinaUTF-8compatibleencoding Thefiledoesnotalreadycontainconflictmarkers Thefile,withconflictmarkersadded,isnotover200KBinsize Thefileexistsunderthesamepathinbothbranches Ifanyfileinyourmergerequestcontainingconflictscan'tmeetallofthese criteria,youcan'tresolvethemergeconflictintheUI. Additionally,GitLabdoesnotdetectconflictsinrenamesawayfromapath.For example,thisdoesnotcreateaconflict: Onbrancha,doinggitmvfile1file2 Onbranchb,doinggitmvfile1file3. Instead,bothfilesarepresentinthebranchafterthemergerequestismerged.



請為這篇文章評分?