Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

funny refname error when creating a new remote branch

So I've gotten a project up on github and everything is dandy. Now I want to create a new branch.

Here's what I've done:

  1. created a new local branch
  2. pushed the new branch to github

Here's the problem: During the push to my remote, I get this error:

Repository ssh://[email protected]/<username>/ProjectColossus.git

funny refname
error: refusing to create funny ref 'workingBranch' remotely

My remote repo is called origin, so I've tried using that refname as suggested in another answer here on stackoverflow, but I get the same error. I've also tried using the same name as my new local branch, in the "Target Ref Name:" field before the remote push, but I really just am not sure what I'm doing at this point. I know there's something I'm not getting about git remote pushes, so a little explanation would be super helpful. I'm pretty new to git and version control, but I'm an intermediate level programmer (starting second year CS in January).

like image 534
Scuba Steve Avatar asked Dec 09 '12 21:12

Scuba Steve


2 Answers

In the Target Ref Name, probably you have to add refs/heads:

refs/heads/name_of_your_new_branch

In your specific case:

refs/heads/workingBranch

(at least, it is the way with Bitbucket - egit, the Eclipse plugin for Eclipse)

like image 165
chelder Avatar answered Oct 02 '22 04:10

chelder


I find it a litle bit silly that EGit expects something like V0.0.1 when you create a Tag (placing the tag to /refs/tags/V0.0.1 location in the local repository) and it expects to provide the refname like /refs/tags/V0.0.1 when you push the Tag into the remote repository

like image 32
Sergiu Avatar answered Oct 02 '22 03:10

Sergiu