Error map

cannot lock ref error: cannot lock ref 'refs/remotes/origin/x': is at … but expected … / unable to update local ref

Git · layer 7, Build & delivery

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). 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.

cannot lock ref — error: cannot lock ref 'refs/remotes/origin/x': is at … but expected … / unable to update local ref (Git)cannot lock…untracked files overwritten — error: The following untracked working tree files would be overwritten by checkout/merge (Git)untracked files ove…submodule url — fatal: No url found for submodule path 'x' in .gitmodules (Git)submodule urlorigin not a repository — fatal: 'origin' does not appear to be a git repository (Git)origin not a reposi…merge commit revert — error: commit x is a merge but no -m option was given. (Git)merge commit revertrefs on function components — Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? (React)refs on function co…Repository not found — remote: Repository not found. fatal: repository 'https://github.com/x/y.git/' not found (Git)Repository not foundnon-bare push — ! [remote rejected] main -> main (branch is currently checked out) (Git)non-bare pushbroken ref — warning: ignoring broken ref refs/remotes/origin/HEAD (Git)broken refremote origin exists — error: remote origin already exists. (Git)remote origin existsunknown revision HEAD — fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. (Git)unknown revision HE…couldn't find remote ref — fatal: couldn't find remote ref main (Git)couldn't find remot…LFS smudge error — Error downloading object: x: Smudge error / This repository is over its data quota (Git)LFS smudge errorchanges overwritten — error: Your local changes to the following files would be overwritten by merge (Git)changes overwrittenAuthentication failed — fatal: Authentication failed for 'https://github.com/x/y.git/' (Git)Authentication fail…cannot rebase — error: cannot pull with rebase: You have unstaged changes. Please commit or stash them. (Git)cannot rebaseCould not resolve host — fatal: unable to access 'https://github.com/…': Could not resolve host: github.com (Git)Could not resolve h…branch exists — fatal: a branch named 'x' already exists (Git)branch existsdetached HEAD — You are in 'detached HEAD' state. (Git)detached HEADnot a valid object name — fatal: Not a valid object name: 'main'. (Git)not a valid object …uncontrolled to controlled — Warning: A component is changing an uncontrolled input to be controlled (React)uncontrolled to con…Adjacent JSX elements — Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (React)Adjacent JSX elemen…setState during render — Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`) (React)setState during ren…publickey — Git: Permission denied (publickey). fatal: Could not read from remote repository. (Git)publickeypassword auth removed — remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. (Git)password auth remov…Host key verification failed — Host key verification failed. fatal: Could not read from remote repository. (Git)Host key verificati…non-fast-forward — Git: ! [rejected] … (fetch first) — error: failed to push some refs (Git)non-fast-forwardGH001 large files — remote: error: GH001: Large files detected. File x is 120 MB; this exceeds GitHub's file size limit of 100.00 MB (Git)GH001 large filesprotected branch — remote: error: GH006: Protected branch update failed / pre-receive hook declined (Git)protected branchnot possible to fast-forward — fatal: Not possible to fast-forward, aborting. (Git)not possible to fas…index.lock exists — fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository (Git)index.lock existsrebase in progress — fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase. (Git)rebase in progresspathspec did not match — error: pathspec 'x' did not match any file(s) known to git (Git)pathspec did not ma…src refspec — error: src refspec main does not match any (Git)src refspecno upstream branch — fatal: The current branch x has no upstream branch. (Git)no upstream branch

Directly related (12)

untracked files overwrittenGit

error: The following untracked working tree files would be overwritten by checkout/merge

Untracked local files have the same paths as files coming from the other branch.

submodule urlGit

fatal: No url found for submodule path 'x' in .gitmodules

A submodule entry exists in the index but its URL is missing from .gitmodules.

origin not a repositoryGit

fatal: 'origin' does not appear to be a git repository

No remote named origin is configured (or it points nowhere valid).

merge commit revertGit

error: commit x is a merge but no -m option was given.

git revert or cherry-pick on a merge commit needs to know which parent is the mainline.

refs on function componentsReact

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

A ref was passed to a function component that doesn’t forward it.

Repository not foundGit

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.

non-bare pushGit

! [remote rejected] main -> main (branch is currently checked out)

You pushed to a non-bare repository whose working tree has that branch checked out.

broken refGit

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.

remote origin existsGit

error: remote origin already exists.

A remote named origin is already configured.

unknown revision HEADGit

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.

The repository has no commits yet (or the ref doesn’t exist), so HEAD can’t be resolved.

couldn't find remote refGit

fatal: couldn't find remote ref main

The branch you tried to pull/fetch doesn’t exist on the remote.

LFS smudge errorGit

Error downloading object: x: Smudge error / This repository is over its data quota

Git LFS couldn’t download a large file — missing LFS install, auth problems, or the LFS bandwidth/storage quota is exhausted.

Two steps away (22)

changes overwrittenGit

error: Your local changes to the following files would be overwritten by merge

git pull/merge would modify files you’ve changed but not committed.

Authentication failedGit

fatal: Authentication failed for 'https://github.com/x/y.git/'

HTTPS authentication to the Git host failed — wrong or expired credentials, or a password used where a token is required.

cannot rebaseGit

error: cannot pull with rebase: You have unstaged changes. Please commit or stash them.

A rebase (or pull --rebase) needs a clean working tree.

Could not resolve hostGit

fatal: unable to access 'https://github.com/…': Could not resolve host: github.com

DNS lookup for the Git host failed from this machine.

branch existsGit

fatal: a branch named 'x' already exists

You tried to create a branch whose name is already taken locally.

detached HEADGit

You are in 'detached HEAD' state.

HEAD points at a commit instead of a branch, so new commits won’t belong to any branch.

not a valid object nameGit

fatal: Not a valid object name: 'main'.

The branch or commit doesn’t exist yet — typically in a new repo before the first commit.

uncontrolled to controlledReact

Warning: A component is changing an uncontrolled input to be controlled

An input’s `value` started as `undefined` (uncontrolled) and later became a defined value (controlled), or vice versa.

Adjacent JSX elementsReact

Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?

A component returns two sibling JSX elements without a single parent.

setState during renderReact

Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`)

A child component updated a parent’s state during its render instead of in an effect or event handler.

publickeyGit

Git: Permission denied (publickey). fatal: Could not read from remote repository.

SSH authentication to GitHub/GitLab/Bitbucket failed — no key, wrong key, or the key isn’t added to your account.

password auth removedGit

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

GitHub no longer accepts account passwords for Git over HTTPS.

Host key verification failedGit

Host key verification failed. fatal: Could not read from remote repository.

SSH doesn’t trust the server’s host key — first connection in a non-interactive environment, or the key changed.

non-fast-forwardGit

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.

GH001 large filesGit

remote: error: GH001: Large files detected. File x is 120 MB; this exceeds GitHub's file size limit of 100.00 MB

GitHub rejected the push because a file over 100 MB is in your commits — even if you deleted it later.

protected branchGit

remote: error: GH006: Protected branch update failed / pre-receive hook declined

The server rejected your push because of branch protection rules or a server-side hook.

not possible to fast-forwardGit

fatal: Not possible to fast-forward, aborting.

pull is configured to fast-forward only, but your branch and the remote have diverged.

index.lock existsGit

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.

rebase in progressGit

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).

pathspec did not matchGit

error: pathspec 'x' did not match any file(s) known to git

Git couldn’t find the file or branch name you referenced.

src refspecGit

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.

no upstream branchGit

fatal: The current branch x has no upstream branch.

The local branch isn’t linked to a remote branch yet, so a bare git push doesn’t know where to go.