Resolve conflicts · Merge requests · Project · User ... - ETSI Labs
文章推薦指數: 80 %
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.
延伸文章資訊
- 1Resolve conflicts · Merge requests · Project · User ... - ETSI Labs
NOTE: GitLab resolves conflicts by creating a merge commit in the source branch that is not autom...
- 2Resolve conflicts · Merge requests · Project · User · Help · GitLab
Resolve conflicts: interactive mode ... Introduced in GitLab 8.11. ... Once all conflicts have be...
- 3How to resolve conflict in merge request in gitlab? - Stack ...
Gitlab is right. What you're doing here by resolving conflicts, is merging master in 156 . First ...
- 4Resolving Merge Conflicts from the GitLab UI
If a merge request has conflicts, GitLab gets a list of the files with conflicts. For each file, ...
- 5Merge conflicts - GitLab Docs