Issue
When pushing local development changes to Version Control, the following message appears:
There are incoming changes from the server that you need to merge before pushing your changes. Pull changes from the server, resolve conflicts, and push again.When trying to perform those steps mentioned in the message above, the pull fails with the below error:
LibGit2Sharp.NotFoundException: object not found - no match for id (INSERT_ID)
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 155
at LibGit2Sharp.Core.Proxy.git_merge(RepositoryHandle repo, AnnotatedCommitHandle[] heads, GitMergeOpts mergeOptions, GitCheckoutOpts checkoutOptions, Boolean& earlyStop) in /_/LibGit2Sharp/Core/Proxy.cs:line 1320
at LibGit2Sharp.Repository.NormalMerge(AnnotatedCommitHandle[] annotatedCommits, Signature merger, MergeOptions options) in /_/LibGit2Sharp/Repository.cs:line 1619
at LibGit2Sharp.Repository.Merge(AnnotatedCommitHandle[] annotatedCommits, Signature merger, MergeOptions options) in /_/LibGit2Sharp/Repository.cs:line 1536
at LibGit2Sharp.Repository.Merge(Branch branch, Signature merger, MergeOptions options) in /_/LibGit2Sharp/Repository.cs:line 1262
at Mendix.Modeler.VersionControl.Actions.GitMergeAction.MergeWithResult(IRepository repo, Branch featureBranch, Signature signature, FastForwardStrategy fastForwardStrategy) in Mendix.Modeler.VersionControl.Git\Actions\GitMergeAction.cs:line 64
at Mendix.Modeler.VersionControl.Operations.Git.GitUpdateOperation.TryMerge(IRepository repo, Signature signature) in Mendix.Modeler.VersionControl.Git\Operations\GitUpdateOperation.cs:line 114
at Mendix.Modeler.VersionControl.Operations.Git.GitUpdateOperation.DoUpdate(UpdateRequest updateRequest, Repository repo) in Mendix.Modeler.VersionControl.Git\Operations\GitUpdateOperation.cs:line 75Environment
Version Control
Cause
Most of the time, the above error indicates a conflict of the merge, since an object is missing. According to best practice, it is best to pull the latest changes from the remote repository after each merge to avoid any conflicts.
Solution/Workaround
To solve the error, please consider whether development changes can be lost and then utilize the following suggestions:
-
- Are the local changes easy to recreate (i.e. can work be lost)? If so, please do the following:
- Delete the local project folder
- Download the project fresh from Version Control
- Redo the changes.
- If the local changes are extensive and there is some flexibility with branch management, please try the following:
- Create a branch from the main line that contains the locally committed changes (which had the mentioned problem).
- Download a fresh version of the project from the version control server and open it.
- Lastly, merge the branch with the locally committed changes into the newly downloaded version from the Team Server.
- Are the local changes easy to recreate (i.e. can work be lost)? If so, please do the following:
Internal information related
- 230109
Additional information
Mendix Documentation:
0 Comments