Troubleshooting git bisect keeps skipping commits and ends with 'The first bad commit could be any of...' instead of one SHA. Skip whole ranges, use exit code 125, and fix the underlying build/environment problem to finish the bisect.
Troubleshooting Your PR has approvals and green CI but GitHub, GitLab, or Bitbucket still won't let you merge. Find the exact rule that's failing and clear it without weakening protection.
Troubleshooting Git stops a cherry-pick saying the commit is now empty after you resolved a conflict. When to run --skip, when to use --allow-empty, and why --empty=drop won't help here.
Troubleshooting Git re-prompts for a password on every operation, hangs for 30 seconds, or fails with 403/401 because the credential helper is stale or misconfigured. Erase the cached credential and re-auth. Works for GitHub, GitLab, and Bitbucket.
Troubleshooting Made commits in detached HEAD and they vanished after switching branches? Find the SHA in the reflog and attach it to a branch before git gc prunes it.
Troubleshooting A git push --force wiped teammates' work from a shared branch. Recover the lost commits from the reflog or GitHub Activity view and stop it recurring.
Troubleshooting Pre-commit and pre-push hooks stay silent after a fresh clone. Git never clones .git/hooks/ — here is why, plus the one-line core.hooksPath fix and a correct husky v9 / lefthook setup.
Troubleshooting Your checked-out file is LFS pointer text, not the real binary. Run git lfs install then git lfs pull to fix it in two commands, plus how to diagnose why the smudge filter skipped.
Troubleshooting GitHub rejects your push because a file over 100 MiB lives in history. Excise it from every commit with git-filter-repo, then force-push cleanly.
Troubleshooting A line-ending normalization turned a 2-line change into a 3,000-line CRLF/LF diff. Diagnose which bucket you're in, fix .gitattributes, renormalize, and stop it recurring.
Troubleshooting Git marks a binary file as conflicted but shows no diff markers. Use git checkout --ours/--theirs to pick the right version and finish the merge in minutes.
Troubleshooting A blobless monorepo clone shows empty, outdated, or missing files after a pull. Backfill the missing blobs, re-cone the sparse checkout, and stop it recurring.
Troubleshooting git pull --rebase stopped on a confusing conflict, then git log looks wrong — new SHAs, reordered commits, a 'fix conflict' commit. What is normal, what is broken, and how to recover.
Troubleshooting Your commits vanished after git rebase. Recover them from ORIG_HEAD or the reflog in under two minutes, with no data loss.
Troubleshooting git revert fails with 'commit is a merge but no -m option was given.' Learn which parent (-m 1 vs -m 2) to pick, revert the right changes, and re-merge later without losing them.
Troubleshooting An API key or password landed in a public GitHub repo. Rotate the key first, then purge it from history with git-filter-repo before a scraper uses it.
Troubleshooting Your git stash list is empty after switching branches and your work-in-progress changes have vanished. Find them in the stash reflog or with git fsck and restore them.
Troubleshooting git submodule update keeps checking out an old commit, an empty folder, or a SHA that does not exist. Diagnose which of six causes you hit, then fix the pointer and sync.
Troubleshooting A release tag landed on the wrong commit and you already pushed it. Move the tag safely, force-fetch it on every clone, and handle the npm/GitHub Release caches that already pinned the old code.
Troubleshooting A git worktree breaks after its branch was deleted or its directory was removed. Prune the stale registration, repair a moved worktree, or rescue uncommitted work — verified commands for Git 2.36+.
Troubleshooting Codex ran git commit --amend, an interactive rebase, or force-pushed and rewrote shared history. Lock the agent to forward-only commits with AGENTS.md, the sandbox network toggle, and a GitHub ruleset.
Troubleshooting After a rebase or branch switch Cursor cites files and line numbers that no longer exist. The indexer fell behind your git state. Force a re-index and harden the workflow.