Resolve conflicts · Merge requests · Project · User · Help · GitLab
文章推薦指數: 80 %
Resolve conflicts: interactive mode ... Introduced in GitLab 8.11. ... Once all conflicts have been marked as using 'ours' or 'theirs', the conflict can be resolved ... Help Help Mergerequestconflictresolution Mergeconflictsoccurwhentwobrancheshavedifferentchangesthatcannotbe mergedautomatically. Gitisabletoautomaticallymergechangesbetweenbranchesinmostcases,but therearesituationswhereGitwillrequireyourassistancetoresolvethe conflictsmanually.Typically,thisisnecessarywhenpeoplechangethesame partsofthesamefiles. GitLabwillpreventmergerequestsfrombeingmergeduntilallconflictsare resolved.Conflictscanberesolvedlocally,orinmanycaseswithinGitLab (seeconflictsavailableforresolution forinformationonwhenthisisavailable). NOTE:Note: GitLabresolvesconflictsbycreatingamergecommitinthesourcebranchthat isnotautomaticallymergedintothetargetbranch.Thisallowsthemerge committobereviewedandtestedbeforethechangesaremerged,preventing unintendedchangesenteringthetargetbranchwithoutrevieworbreakingthe build. Resolveconflicts:interactivemode IntroducedinGitLab8.11. Clickingthiswillshowalistoffileswithconflicts,withconflictsections highlighted: Onceallconflictshavebeenmarkedasusing'ours'or'theirs',theconflict canberesolved.Thiswillperformamergeofthetargetbranchofthemerge requestintothesourcebranch,resolvingtheconflictsusingtheoptions chosen.Ifthesourcebranchisfeatureandthetargetbranchismaster, thisissimilartoperforminggitcheckoutfeature;gitmergemasterlocally. Resolveconflicts:inlineeditor IntroducedinGitLab8.13. Themergeconflictresolutioneditorallowsformorecomplexmergeconflicts, whichrequiretheusertomanuallymodifyafileinordertoresolveaconflict, tobesolvedrightformtheGitLabinterface.UsetheEditinlinebutton toopentheeditor.Onceyou'resureaboutyourchanges,hitthe Committosourcebranchbutton. Conflictsavailableforresolution GitLaballowsresolvingconflictsinafilewhereallofthebelowaretrue: Thefileistext,notbinary ThefileisinaUTF-8compatibleencoding Thefiledoesnotalreadycontainconflictmarkers Thefile,withconflictmarkersadded,isnotover200KBinsize Thefileexistsunderthesamepathinbothbranches Ifanyfilewithconflictsinthatmergerequestdoesnotmeetallofthese criteria,theconflictsforthatmergerequestcannotberesolvedintheUI. Additionally,GitLabdoesnotdetectconflictsinrenamesawayfromapath.For example,thiswillnotcreateaconflict:onbrancha,doinggitmvfile1file2;onbranchb,doinggitmvfile1file3.Instead,bothfileswillbe presentinthebranchafterthemergerequestismerged.
延伸文章資訊
- 1How 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 ...
- 2Resolve conflicts · Merge requests · Project · User · Help - GitLab
Merge conflict resolution ... Introduced in GitLab 8.11. ... Once all conflicts have been marked ...
- 3Resolving Merge Conflicts from the GitLab UI
If a merge request has conflicts, GitLab gets a list of the files with conflicts. For each file, ...
- 4Resolve conflicts · Merge requests · Project · User · Help · GitLab
Resolve conflicts: interactive mode ... Introduced in GitLab 8.11. ... Once all conflicts have be...
- 5Merge request conflict resolution - 《Gitlab 中文文档》 - 书栈网
Resolve conflicts: inline editor. Introduced in GitLab 8.13. 合并冲突解决编辑器允许更复杂的合并冲突,需要用户手动修改文件以解决冲突,...