Git Core Message Reference

Version Control System50 error codes

Reference index of 50 built-in Git core messages with meanings, common causes, repository-state cues, and related context.

Severity

Showing 50 of 50 error codes

object-directory-does-not-exist
High

Git's internal object database is missing or corrupted.

3 common causes
out-of-memory-malloc-failed
High

The operating system denied Git's request for more RAM during a heavy operation.

3 common causes
pack-has-bad-object
High

Git detected corruption inside one of its compressed data bundles (packfiles).

3 common causes
fatal-loose-object-is-corrupt
High

An uncompressed file in Git's internal database has an invalid checksum or zero bytes.

3 common causes
corrupt-index
High

The internal staging area database file has become corrupted.

3 common causes
merge-conflict
Medium

Git paused the merge because it cannot automatically resolve overlapping changes.

3 common causes
local-changes-overwritten-by-merge
Medium

Git aborted the merge to protect uncommitted changes in your working directory.

3 common causes
local-changes-overwritten-by-checkout
Medium

Git prevented a branch switch because it would overwrite unsaved changes in your working directory.

3 common causes
untracked-files-overwritten-by-merge
Medium

Git aborted the merge because it would overwrite untracked files in your working directory.

3 common causes
failed-to-push-some-refs
Medium

Git rejected your push because the remote repository contains commits missing from your local branch.

3 common causes
non-fast-forward
Medium

Git rejected your push because your branch is behind the remote, preventing a linear update.

3 common causes
remote-rejected
Medium

The remote server actively refused to accept your pushed commits due to server-side rules.

3 common causes
divergent-branches
Medium

Your local branch and the remote tracking branch have both received different commits.

3 common causes
repository-not-found
Medium

The remote server could not locate the repository at the specified URL.

3 common causes
dubious-ownership
Medium

Git refused to run because the repository folder is owned by a different system user.

3 common causes
permission-denied-publickey
Medium

The remote server rejected your SSH connection because it did not recognize your SSH key.

3 common causes
could-not-read-from-remote-repository
Medium

Git failed to establish a data connection with the remote repository.

3 common causes
authentication-failed
Medium

The server rejected your credentials during an HTTPS connection.

3 common causes
could-not-resolve-host
Medium

Your computer's DNS could not find the IP address for the remote repository's domain name.

3 common causes
remote-end-hung-up-unexpectedly
Medium

The connection to the server was closed abruptly before Git finished transferring data.

3 common causes
rpc-failed-curl
Medium

The underlying HTTP client (cURL) failed to complete the network request.

3 common causes
early-eof
Medium

Git received an End-Of-File signal before it finished downloading the expected repository data.

3 common causes
unable-to-write-new-index-file
Medium

Git failed to save changes to the staging area due to a filesystem issue.

3 common causes
cannot-lock-ref
Medium

Git could not update a specific branch pointer because it is locked or corrupted.

3 common causes
could-not-apply-commit
Medium

Git stopped a rebase or cherry-pick because the commit conflicts with your current code.

3 common causes
no-submodule-mapping-found-in-gitmodules
Medium

Git found a submodule reference without a matching configuration entry.

3 common causes
fatal-clone-of-submodule-failed
Medium

Git successfully cloned the main repository but failed to download a required submodule.

3 common causes
filename-too-long
Medium

Git could not check out a file because its path exceeds the OS length limit.

3 common causes
patch-failed
Medium

Git could not apply a patch file because the target code has changed too much.

3 common causes
unrelated-histories
Medium

Git refused to merge two projects because they do not share a common ancestor commit.

3 common causes
sparse-checkout-leaves-no-entry
Medium

Your sparse-checkout rules excluded all files, leaving your working directory empty.

3 common causes
unmerged-paths
Low

You have unresolved file conflicts preventing Git from completing the current operation.

3 common causes
remote-origin-already-exists
Low

You tried to add a remote named 'origin', but one with that name already exists.

3 common causes
branch-has-no-upstream
Low

Git does not know which remote branch should receive your pushed commits.

3 common causes
detached-head
Low

You checked out a specific commit, detaching your working directory from the branch history.

3 common causes
src-refspec-does-not-match-any
Low

Git could not find the local branch you are trying to push.

3 common causes
pathspec-did-not-match-any-file
Low

Git could not find the file or directory you specified in your command.

3 common causes
remote-head-nonexistent-ref
Low

The remote repository's default branch points to a branch that does not exist.

3 common causes
not-a-git-repository
Low

Git could not find the hidden directory required to execute commands.

3 common causes
index-lock-file-exists
Low

Git cannot run because another Git process is currently modifying the repository.

3 common causes
fatal-bad-revision-head
Low

Git cannot resolve 'HEAD' because the repository has no commits yet.

3 common causes
rebase-in-progress
Low

You tried to run a Git command while a previous rebase operation is still paused.

3 common causes
pre-commit-hook-failed
Low

A local script (hook) executed by Git failed, forcing Git to abort the commit.

3 common causes
unable-to-auto-detect-email-address
Low

Git refused to create a commit because you haven't configured your name and email.

3 common causes
ambiguous-argument
Low

Git doesn't know whether you are referring to a branch name or a file path.

3 common causes
tag-already-exists
Low

You attempted to create a Git tag using a name that is already taken.

3 common causes
submodule-repository-exists
Low

Git cannot add a submodule because a Git repository already occupies that path.

3 common causes
bad-config-line-in-file
Low

Git cannot parse its configuration file due to a syntax error.

3 common causes
unknown-revision-or-path-not-in-working-tree
Low

Git could not parse your input as a valid commit, branch, or file path.

3 common causes
your-branch-is-ahead-of-origin
Low

Your local branch contains commits that have not yet been pushed to the remote server.

3 common causes