Error while committing changes for GIT private repository

Hi All,   We are facing below error when we try to commit changes from studio pro to GIT private repository.   Is there any solution for this error ?   LibGit2Sharp.LibGit2SharpException: object not found - no match for id (820cf63a74ea8d3a9d0577aec62a489df6b5ba12)    at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154    at LibGit2Sharp.Core.Proxy.git_graph_ahead_behind(RepositoryHandle repo, Commit first, Commit second) in /_/LibGit2Sharp/Core/Proxy.cs:line 980    at LibGit2Sharp.HistoryDivergence..ctor(Repository repo, Commit one, Commit another) in /_/LibGit2Sharp/HistoryDivergence.cs:line 23    at LibGit2Sharp.ObjectDatabase.CalculateHistoryDivergence(Commit one, Commit another) in /_/LibGit2Sharp/ObjectDatabase.cs:line 551    at LibGit2Sharp.BranchTrackingDetails..ctor(Repository repo, Branch branch) in /_/LibGit2Sharp/BranchTrackingDetails.cs:line 24    at LibGit2Sharp.Branch.get_TrackingDetails() in /_/LibGit2Sharp/Branch.cs:line 98    at Mendix.Modeler.VersionControl.Operations.Git.GitCheckWorkingCopyOperation.Execute(String projectDirectory) in Mendix.Modeler.VersionControl\Operations\Git\GitCheckWorkingCopyOperation.cs:line 67    at Mendix.Modeler.VersionControl.CommitPreparer.<>c__DisplayClass21_0.<AddCheckWorkingCopyStep>b__0(IProgressInfo info) in Mendix.Modeler.VersionControl.View\Commit\CommitPreparer.cs:line 156    at Mendix.Modeler.UIFramework.Progress.ProcessRunner.RunStep(IStep step) in Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 160    at Mendix.Modeler.UIFramework.Progress.ProcessRunner.OnDoWork(Object sender, DoWorkEventArgs e) in Mendix.Modeler.UIFramework\Progress\ProcessRunner.cs:line 81    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
2 answers

This usually occurs if the last pull was shallow. 
So if you have the access to the local repo folder – then first stash all the changes using ```git stash```

Followed up with ```git fetch --unshallow```

then do commit and attempt a push.

see how it goes.




  1. Make sure the local repository is in a clean state with no uncommitted changes. Commit or stash any pending changes before proceeding.

  2. Ensure that the remote repository (the private Git repository you're pushing to) is accessible and there are no issues with its configuration.

  3. Before committing and pushing your changes, try fetching and pulling any updates from the remote repository to ensure your local repository is up to date.

  4. The error might be caused by a corruption of Git objects. You can try running git fsck to check the integrity of the objects in your repository.