Git Troubleshooting
Git Troubleshooting
Verify local and remote repository state before retrying commit, tag, push, cleanup, or release behavior.
git statusCategory
Quick Command
inspect local state -> inspect destinations -> correct -> verifyScope of This Pageâ
Use this page when a problem crosses command boundaries or when you need to inspect shared repository, reference, branch, or remote state. For an error that clearly belongs to one invocation, use the linked Commit, Tag, Push, or Branch Cleanup guide for focused recovery steps.
Inspect Before Retryingâ
git status --short --branch
git diff
git diff --staged
git log -3 --decorate --oneline
git tag --points-at HEAD
git remote -v
git branch --allRepository and Staging
Information
| NOT_GIT_REPO | Run Custy from the intended repository root and confirm git status works there. |
|---|---|
| NO_STAGED_FILES or NO_STAGED_CHANGES | Inspect the index. Stage only reviewed files or adjust auto_stage and stage_mode deliberately. |
| INVALID_STAGE_MODE | Use the supported all, update, manual, or none behavior for the selected command. |
| AUTO_STAGE_FAILED or STAGING_FAILED | Read the underlying Git response, file permissions, ignore rules, and repository state before repeating. |
| Unexpected staged content | Stop before commit or push; compare git diff and git diff --staged, then reconcile according to project policy. |
Commits and Message Validation
- Confirm the configured commit-message path exists and contains reviewed content.
- Read the first commit-format or Commitizen validation message rather than bypassing the entire validation profile.
- Verify whether the commit already exists before retrying a partial pipeline.
- Do not rewrite a pushed commit automatically; follow the repository's shared history policy.
See Commit Troubleshooting for the focused message, editor, staging, changelog, and content checks.
Tags
git show --decorate <tag>
git ls-remote --tags origin <tag>If a tag already exists, compare its target and annotation before choosing a new approved version. Never move or replace a published tag casually; release assets and CI/CD may already depend on it.
Remotes, Authentication, and Push
REMOTE_NOT_FOUNDorMAIN_REMOTE_MISSING: comparegit remote -vwithtool.custy.gitand the Push command's resolved destinations.- Authentication failure: test Git directly and repair the credential manager, SSH agent, provider permission, or CI secret without placing credentials in Custy configuration.
- Rejected update: read the remote response for non-fast-forward history, required review, branch protection, or missing permission.
- Partial multi-remote success: verify every destination independently and recover only failed destinations.
- Do not force-push unless the repository's explicit policy permits it.
Branch Cleanup
No deletion can be correct behavior when a branch is protected, outside the configured prefixes, too new, not in the selected merge state, or the command is in dry-run mode. Review candidates before changing filters, and never weaken protected-branch safeguards simply to make cleanup remove more branches.