[gitorious] fatal: master cannot be resolved to branch

8,420 views
Skip to first unread message

tjg

unread,
May 21, 2010, 12:01:47 AM5/21/10
to Gitorious
Hi all,

New to git here, and things were going okay for a while until I did a
"git push origin master" and received this error:

fatal: master cannot be resolved to branch.

I had a clean working directory. Created a branch called "items", did
a little work, but decided I didn't need the branch and did "git
branch -D items". Resumed normal work, did some commits and then tried
to push to remote repo (origin).

Any ideas what this means or how to recover?

git status reports a clean working directory, and I'm quite definitely
back on the MASTER branch. What gives?

I can't find any reference to this particular error message via
Google.

Many thanks,
Tim

--
To post to this group, send email to gito...@googlegroups.com
To unsubscribe from this group, send email to
gitorious+...@googlegroups.com

Marius Mårnes Mathiesen

unread,
May 21, 2010, 4:16:21 AM5/21/10
to gito...@googlegroups.com
On Fri, May 21, 2010 at 6:01 AM, tjg <enwoo...@gmail.com> wrote:
git status reports a clean working directory, and I'm quite definitely
back on the MASTER branch. What gives?

Tim,
 Are you sure you have a master branch? What does `git branch` tell you?

Cheers,
- Marius 

tjg

unread,
May 21, 2010, 9:14:41 AM5/21/10
to Gitorious
Yes, "git branch" confirmed I had a master branch.

Funny, I think I resolved this fatal error by simply doing another
commit to the master branch. That operation seems to have resynced
whatever was amiss and a subsequent "git push origin master" operation
worked perfectly.

Just one of those hiccups, I guess, but it threw me in that I couldn't
get git to reveal or indicate anything that was wrong.

So, if anyone else gets this error, just try a regular commit
operation, and see if that puts git back on track.

Tim


On May 21, 4:16 am, Marius Mårnes Mathiesen
<marius.mathie...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages