Error map
error: unable to resolve reference 'refs/heads/main': reference broken fatal: bad object refs/heads/main
Git · layer 7, Build & delivery
Centre: this error. First ring: errors it is linked with (11). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (11)
error: object file .git/objects/x is empty / fatal: loose object is corrupt
The local Git object database is corrupted — usually after a crash, disk full or sync tool interference.
warning: ignoring broken ref refs/remotes/origin/HEAD
A ref file is empty or points to a missing object — usually refs/remotes/origin/HEAD after the default branch changed.
error: failed to update ref: refs/heads/main is at a1b2 but expected c3d4
Another process changed the ref while Git updated it.
error: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Permission denied
Git can't write reflog or ref files.
error: inflate: data stream error (incorrect header check) error: unable to unpack header
A Git object file is damaged.
error: bad signature 0x00000000 fatal: index file corrupt
The staging area file `.git/index` is damaged.
fatal: Branch rename failed
Git couldn't rename the branch.
File system check exit code is 8 / Volume could not be verified completely
Disk Utility found APFS errors it couldn't repair.
fatal: pack has bad object at offset 12345: inflate returned -3
A packfile is damaged.
fatal: Cannot rebase onto multiple branches.
The branch name you gave matches several refs.
fatal: 'feature/my branch' is not a valid branch name.
The branch name contains characters Git forbids.
Two steps away (32)
fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository
A lock file from another (or crashed) Git process blocks this command.
fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase.
A previous rebase is still in progress (or was interrupted).
fatal: You have not concluded your merge (MERGE_HEAD exists). Please, commit your changes before you merge.
A merge is still in progress — conflicts were resolved (or not) but not committed.
error: remote origin already exists.
A remote named origin is already configured.
remote: Repository not found. fatal: repository 'https://github.com/x/y.git/' not found
GitHub/GitLab says the repository doesn’t exist — or you lack access to a private repo.
error: cannot lock ref 'refs/remotes/origin/x': is at … but expected … / unable to update local ref
Git couldn’t update a reference — stale remote-tracking refs, case-only branch name clashes, or a leftover lock file.
Git: ! [rejected] … (fetch first) — error: failed to push some refs
The remote branch has commits you don’t have locally, so Git refuses to overwrite them. Pull (merge or rebase) first, then push.
error: src refspec main does not match any
You pushed a branch name that doesn’t exist locally — usually no commits yet, or the branch is called master not main.
error: RPC failed; HTTP 400 curl 22 / curl 92 HTTP/2 stream was not closed cleanly — the remote end hung up unexpectedly
A large HTTPS push/clone broke mid-transfer — size limits, proxies or flaky HTTP/2.
Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied
Windows refused an operation because the account or process lacks permission — seen in Windows Update, installers, Task Scheduler…
WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for 'key.pem' are too open
SSH refuses to use a private key that other users can read; it must be readable only by you (chmod 600).
GitHub Actions: Error: Resource not accessible by integration (403)
The workflow’s GITHUB_TOKEN doesn’t have the permission needed for that API call (comment, push, create release, write packages).
macOS: diskutil: Unmount of disk2s1 failed: at least one volume could not be unmounted / The disk wasn't ejected because one or more programs may be using it
macOS can't eject a drive because a process still has files open on it.
error: Could not read 4b825dc642cb6eb9a060e54bf8d69288fbee4904 / bad object after git gc
A dropped commit was removed because it was unreachable and expired.
remote: error: unable to create temporary object directory
The server couldn't store the pushed objects.
Automatic Repair couldn't repair your PC — Log file: C:\Windows\System32\Logfiles\Srt\SrtTrail.txt
Windows failed to boot repeatedly and Startup Repair couldn’t fix it; SrtTrail.txt records the root cause it found.
HEAD is now at a1b2c3d Old commit
A hard reset moved the branch back and your newer commits look gone.
error: Entry 'app.js' not uptodate. Cannot merge. fatal: Merge with strategy recursive failed.
A file with uncommitted changes would be touched by the merge.
fatal: a branch named 'x' already exists
You tried to create a branch whose name is already taken locally.
error: The branch 'feature/x' is not fully merged. If you are sure you want to delete it, run 'git branch -D feature/x'.
Git refuses to delete a branch whose commits aren't merged elsewhere.
error: Cannot delete branch 'main' checked out at '/home/user/repo'
You can't delete a branch that is checked out in this or another worktree.
macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22
A Time Machine backup stopped because the destination is unavailable, full, or the backup set is damaged.
(behavior) FileVault asks for recovery key at startup
FileVault can't unlock with the current password.
fatal: early EOF — fatal: index-pack failed
A clone or fetch was cut off mid-transfer.
Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping.
Git is running garbage collection after a command.
remote: fatal: pack exceeds maximum allowed size (2.00 GiB)
The pushed pack is larger than the server allows.
Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue".
A commit being replayed conflicts with the new base.
(behavior) "ours" and "theirs" are reversed in git rebase
During a rebase Git's "ours" is the branch you rebase onto, and "theirs" is your own commit.
warning: refname 'release' is ambiguous. Git normally never creates a ref that ends with 40 hex characters
A branch and a tag share a name.
fatal: 'feature/x' is already checked out at '/home/user/repo-wt'
A branch can be checked out in only one worktree at a time.
fatal: invalid reference: feature/login
Git can't find a branch or commit with that name.
remote: Branch permissions: You are not allowed to push to branch main
Bitbucket branch restrictions reject your direct push.