A request fails but the checkout has changed
Check status, history and the response payload alongside the success flag or CLI exit status. Inspect any completed changes before retrying; during a rebase also request git_rebase action=status. A connected-server failure can still leave the CLI exit status at zero.
The command targets an unexpected checkout
Check the configured server address and compare recognizable branches and commit history with the intended checkout. A failed server connection can fall back to local execution. Stop changes until the checkout is confirmed, then launch a stdio server in the intended repository; requests have no per-tool repository selector.
A commit is rejected after files enter staging
Check staged content: MCP Git stages before validating a normal commit message, and selected paths do not exclude other already staged work. Remove unintended staging through the repository owner’s normal workflow, then retry with an accepted message such as docs(readme): clarify initial setup steps.
A commit returns staged-only success
Check for rebase_in_progress: true. This stages files for an active rebase without creating a normal commit. Review the resolution and continue the rebase, or preserve needed edits and abort; repeating the commit does not finish it.
Branch creation or checkout is refused
Check the current local branch, rebase status and staged, unstaged, untracked and stashed work. Create feature branches from local develop; resolve or preserve pending work before checkout. A stash also blocks checkout, and creating a branch does not switch to it.
Worktree actions report disabled
Check whether the response mentions worktree_root not set. The standard executable has no setting to enable these actions. Use the owner’s normal worktree provisioning process, then start and verify a separate server in the intended checkout.
A push is refused locally
Check the named target branch. MCP Git refuses pushes to protected main, master and develop; push the intended feature branch or use the owner’s approved publication process. No force option bypasses this rule. Preserve commits made on the wrong local branch before correcting the branch.
Push authentication fails
Check the SSH agent or credential-helper configuration available to the server account when the error says no usable git credentials. Restore access through that account’s normal setup without placing secrets in remote URLs. Push credentials do not establish that private fetch or clone will authenticate; resolve a failed fetch before rebasing against stale tracking information.
The remote rejects a push
Check the rejection reason and both local and remote history. Coordinate divergent or rewritten published history with the owner; satisfy a hook or access requirement before retrying. Rebasing onto origin/develop does not reconcile every change on the remote feature branch. For no such local branch, use the exact existing short branch name.
Rebase cannot start or continue
Check rebase status and conflict paths before starting another operation. Resolve and stage, then continue; another conflict may follow. Start with a complete unchanged-order all-pick plan. Custom choices are not saved for continuation, and the first surviving operation cannot be squash. Preserve needed resolution edits before aborting for a separately verified cleanup process.
Merge returns needs_rebase and the next plan is refused
Check the current branch: merge has already switched to local develop. Return to the feature branch, refresh tracking information and compare local develop with its remote before replanning. A successful local merge still needs a separate approved publication step.
Submodule pull reports success without the expected revision
Check the submodule checkout directly against the intended revision before staging its parent pointer. Only attached branches that can fast-forward advance; detached or diverged checkouts can remain unchanged. Inspect earlier completed entries after a multi-submodule failure, and use the current listed name for a targeted retry.
Clone or init fails and leaves a destination
Check whether the destination is relative, has no parent-directory component, and was empty or absent. Inspect any files left by the failed attempt; preserve useful content and choose a new empty destination if reuse is unsafe. Do not delete the failed directory blindly.
A diff response is incomplete
Check truncated, reported limits and returned counts. Raise supported diff limits or narrow the compared refs; omitted content is not proof of no changes. An empty changed-files list in single-commit detail also does not establish an empty commit.
Requests are rate-limited or time out
Check the retry interval and current repository state. Wait the stated interval and reduce polling; all served tools share the rate budget. A mutation can queue behind another, and a timeout does not prove cancellation or rollback. Inspect state and the relevant remote ref before retrying a write.
Server startup or protocol connection fails
Check the selected transport, endpoint and stderr. Supply a Unix socket path in a private directory or an IP socket address such as 127.0.0.1:8080; keep stdio diagnostics off stdout. Correct the endpoint or startup error, then verify a harmless read before writing. The HTTP listener has no authentication or TLS switch, and connection mode does not isolate repositories.
What you getA recovery path that preserves the intended checkout and existing work.