Resolving merge conflicts after a Git rebase - GitHub Docs
文章推薦指數: 80 %
error: could not apply fa39187... something to add to patch A When you have resolved this problem, run "git rebase --continue". If you prefer to skip this ... SkiptomaincontentGitHubDocsAllproductsGetstartedQuickstartHelloWorldSetupGitCreatearepoForkarepoGitHubflowContributingtoprojectsBesocialCommunicatingonGitHubGitHubglossaryGitcheatsheetLearningresourcesOnboardingGettingstartedwithyourGitHubaccountGettingstartedwithGitHubTeamGettingstartedwithGitHubEnterpriseCloudLearningaboutGitHubGitHub’sproductsDocsversionsGitHublanguagesupportTypesofGitHubaccountsAccesspermissionsGitHubAdvancedSecurityChangestoGitHubplansSigningupforGitHubSignupforanewGitHubaccountVerifyyouremailaddressEnterpriseCloudtrialEnterpriseServertrialUsingGitHubFeaturepreviewSupportedbrowsersGitHubCLIGitHubDesktopGitHubMobileKeyboardshortcutsGitHubCommandPaletteConnectivityproblemsWritingonGitHubStartwritingonGitHubWrite&formatonGitHubBasicformattingsyntaxWorkwithadvancedformattingOrganizeddatawithtablesCollapsedsectionsCreatecodeblocksCreatediagramsMathematicalexpressionsAutolinkedreferencesAttachingfilesPermanentlinkstocodeUsingkeywordsinissuesandpullrequestsWorkwithsavedrepliesAboutsavedrepliesCreatingasavedreplyEditingasavedreplyDeletingasavedreplyUsingsavedrepliesSharecontentwithgistsCreatinggistsForkingandcloninggistsImportingyourprojectsImportcodetoGitHubAboutGitHubImporterUseGitHubImporterUpdateauthorGitHubImporterImportrepolocallyAddlocallyhostedcodeCodemigrationtoolsWorkwithSubversiononGitHubSubversion&GitdifferencesSupportforSubversionclientsPropertiessupportedbyGitHubExploreprojectsContributetoopensourceSavereposwithstarsFollowingpeopleFollowingorganizationsGettingstartedwithGitSetyourusernameCachingcredentialsGitpasswordsmacOSKeychaincredentialsGitworkflowsAboutremoterepositoriesManageremoterepositoriesAssociatetexteditorsHandlelineendingsIgnoringfilesUsingGitAboutGitPushcommitstoaremoteGetchangesfromaremoteNon-fast-forwarderrorSplittingasubfolderAboutGitsubtreemergesAboutGitrebaseGitrebaseResolveconflictsafterrebaseSpecialcharactersinnamesCustomizeyourworkflowExploringintegrationsAboutintegrationsAboutwebhooksAboutGitHubMarketplaceExtensions&integrationsInstallMarketplaceappsInstallapppersonalaccountInstallapporganizationPrivacyonGitHubGitHub'suseofyourdataRequestaccountarchiveManagedatauseforprivaterepoGitHubArchiveprogramResolvingmergeconflictsafteraGitrebaseWhenyouperformagitrebaseoperation,you'retypicallymovingcommitsaround.Becauseofthis,youmightgetintoasituationwhereamergeconflictisintroduced.Thatmeansthattwoofyourcommitsmodifiedthesamelineinthesamefile,andGitdoesn'tknowwhichchangetoapply.Afteryoureorderandmanipulatecommitsusinggitrebase,shouldamergeconflictoccur,Gitwilltellyousowiththefollowingmessageprintedtotheterminal: error:couldnotapplyfa39187...somethingtoaddtopatchA Whenyouhaveresolvedthisproblem,run"gitrebase--continue". Ifyouprefertoskipthispatch,run"gitrebase--skip"instead. Tocheckouttheoriginalbranchandstoprebasing,run"gitrebase--abort". Couldnotapplyfa39187f3c3dfd2ab5faa38ac01cf3de7ce2e841...Changefakefile Here,Gitistellingyouwhichcommitiscausingtheconflict(fa39187).You'regiventhreechoices: Youcanrungitrebase--aborttocompletelyundotherebase.Gitwillreturnyoutoyourbranch'sstateasitwasbeforegitrebasewascalled. Youcanrungitrebase--skiptocompletelyskipthecommit.Thatmeansthatnoneofthechangesintroducedbytheproblematiccommitwillbeincluded.Itisveryrarethatyouwouldchoosethisoption. Youcanfixtheconflict. Tofixtheconflict,youcanfollowthestandardproceduresforresolvingmergeconflictsfromthecommandline.Whenyou'refinished,you'llneedtocallgitrebase--continueinorderforGittocontinueprocessingtherestoftherebase.
延伸文章資訊
- 1git merge (Branching and Merging) - Git 中文开发手册 - 腾讯云
警告: git merge 不鼓励使用不平凡的未提交更改:尽管可能,但可能会让您处于难以在冲突情况下退出的状态。 第四种语法(“ git merge --continue ...
- 2Git - git-merge Documentation
- 3Resolving merge conflicts after a Git rebase - GitHub Docs
error: could not apply fa39187... something to add to patch A When you have resolved this problem...
- 4How do I finish the merge after resolving my merge conflicts?
- 5git遇到衝突了怎麼辦?別緊張,解衝後就好了。
我們只留下meat branch上的那行敘述,如上圖。 Enter: 輸入: git add fileOnlyExistingInMeatBranch git merge --continue ...