Magit error \"fatal: ambiguous argument\"
15 Mar 2012When using magit, I came across errors that looked much like these:
Unpulled commits:
fatal: ambiguous argument 'HEAD..exoplanet/compute_server': unknown revision
or path not in the working tree.
Use '--' to separate paths from revisions
(Here, "exoplanet" is the name of a machine, and "compute_server" the name of a branch.)
The problem turned out to be that .git/config looked like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = exoplanet:~/dotfiles-git-master
[branch "compute_server"]
remote = exoplanet
Note how the branch lists the remote as "exoplanet", but there's no "exoplanet" remote config stanza -- only one called "origin". Changing the remote listed under the branch to be "origin" worked. Here's the working config:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = exoplanet:~/dotfiles-git-master
[branch "compute_server"]
remote = origin
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018