Error map
fatal: object is a tree, not a commit fatal: a1b2c3d is a tree, not a commit / error: object a1b2c3d is a tree, not a commit
Git · layer 7, Build & delivery
Centre: this error. First ring: errors it is linked with (9). 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 (9)
fatal: Not a valid object name: 'main'.
The branch or commit doesn’t exist yet — typically in a new repo before the first commit.
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.
The previous cherry-pick is now empty, possibly due to conflict resolution.
The commit you picked has no changes left, because the same changes already exist on your branch.
error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.
Git couldn't open your configured editor to collect a message or todo list.
On branch main nothing to commit, working tree clean
Git sees no changes to commit.
Changes not staged for commit: modified: app.js no changes added to commit
Edits exist but none are staged.
fatal: your current branch 'main' does not have any commits yet
Commands needing history ran in a brand-new repo.
error: pathspec 'fix' did not match any file(s) known to git error: pathspec 'login' did not match any file(s) known to git
A commit message without quotes was split into file names.
fatal: cannot do a partial commit during a merge.
You tried to commit selected files in the middle of a merge.
Two steps away (25)
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.
You are in 'detached HEAD' state.
HEAD points at a commit instead of a branch, so new commits won’t belong to any branch.
error: pathspec 'x' did not match any file(s) known to git
Git couldn’t find the file or branch name you referenced.
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.
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.
fatal: Not possible to fast-forward, aborting.
pull is configured to fast-forward only, but your branch and the remote have diverged.
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: could not apply a1b2c3d... Fix login bug / hint: After resolving the conflicts, mark them with git add/rm, then run git cherry-pick --continue
The picked commit touches lines that differ on your branch.
error: You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists). Please, commit your changes before you merge.
A previous cherry-pick is still open.
Author identity unknown *** Please tell me who you are.
Git doesn’t know your name and email for commits.
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.
fatal: bad config line 12 in file /home/user/.gitconfig
A Git config file has invalid syntax.
No local changes to save
`git stash` found nothing tracked to stash.
The following paths are ignored by one of your .gitignore files: dist hint: Use -f if you really want to add them.
You tried to add a file that .gitignore excludes.
(behavior) file still shows in git status after adding to .gitignore
Git keeps tracking files that were committed before you ignored them.
CONFLICT (add/add): Merge conflict in config.yml
Both branches created the same file with different content.
fatal: pathspec 'link/file.txt' is beyond a symbolic link
You tried to add a path through a symlink.
error: open("data/db.sqlite"): Permission denied error: unable to index file 'data/db.sqlite' fatal: adding files failed
Git can't read a file to stage it.
error: 'self' captured by a closure before all members were initialized
A closure uses `self` before all stored properties are set.
hint: Using 'master' as the name for the initial branch. This default branch name is subject to change.
A harmless hint: Git's default initial branch name is configurable.
warning: You appear to have cloned an empty repository.
The remote has no commits yet.
fatal: no tag message?
An annotated tag needs a message and the editor returned empty.
Git: CONFLICT (content): Merge conflict in file — Automatic merge failed
Both branches changed the same lines; Git needs you to choose the final content before completing the merge/rebase.
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.
(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.