Introduction
Rebase conflicts on vendorlib JAR files occur because conflicts must be resolved during the interactive rebase process. These conflicts occur when a file has been deleted and replaced with a newer version in different branches or commits.
When running git status on the command line in the project directory, the following message appears, indicating an interactive rebase in progress:
git status
interactive rebase in progress; onto 073cf17b
Last command done (1 command done):
pick 995c37a4 commit per pull
No commands remaining.
You are currently rebasing branch 'Mybranch' on '073cf17b'.
(fix conflicts and then run "git rebase --continue")
(use "git rebase --skip" to skip this patch)
(use "git rebase --abort" to check out the original branch)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: vendorlib/annotations-2.26.20.jar
Unmerged paths:
(use "git restore --staged <file>..." to unstage)
(use "git add/rm <file>..." as appropriate to mark resolution)
both deleted: vendorlib/apache-client-2.26.17.jar
added by us: vendorlib/apache-client-2.26.19.jar
added by them: vendorlib/apache-client-2.26.20.jar
both deleted: vendorlib/auth-2.26.17.jar
added by us: vendorlib/auth-2.26.19.jar
added by them: vendorlib/auth-2.26.20.jarGit understands that both branches deleted the vendorlib/apache-client-2.26.17.jar file, but is unable to decide what new version it should keep.
Environment
Version Control
Instructions/Procedure
To resolve the conflicts and complete the interactive rebase, follow these steps:
-
Identify the conflicts
The
git statuscommand output indicates that there are unmerged paths and conflicts that need to be resolved.Every conflicted file will be listed with three versions:
both deleted: vendorlib/apache-client-2.26.17.jar added by us: vendorlib/apache-client-2.26.19.jar added by them: vendorlib/apache-client-2.26.20.jar -
For every JAR file, remove the unwanted versions and add the one to keep
Example to keep apache-client-2.26.20.jar :
git rm vendorlib/apache-client-2.26.17.jargit rm vendorlib/apache-client-2.26.19.jargit add vendorlib/apache-client-2.26.20.jar -
Validate that there are no more unmerged paths
Run
git status.Verify that it does not output elements listed under
Unmerged paths:Once all conflicts are resolved and staged, continue the rebase with the following command:
git rebase --continue.
Outcome
The rebase will continue, allowing the rebase process to be able to finish in Studio Pro.
Internal information related
- 230090
Additional Information
Mendix documentation: Conflict Resolution using interactive merge
0 Comments