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:

  • created a new local branch
  • pushed the new branch to github
  • Here's the problem: During the push to my remote, I get this error:

    Repository ssh://git@github.com/<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).


    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)


    我发现当你创建一个标签(将标签放置到本地存储库中的/refs/tags/V0.0.1位置)并且它期望提供像/ refs /这样的refname时,EGit期望V0.0.1之类的东西有点傻,标签/ V0.0.1当您将标签推入远程存储库时


    For what it is worth we just had this issue - we are using VS2013 and creating a branch with /refs/heads/ gave an error. We ended up downloading Source Tree from Atlassian (we are using Stash to house our code). This showed an "uncommited change" which was the DesignTimeResolveAssemblyReferencesInput.cache file being altered - something VS2013 was doing. We undid this change and created a new branch, and this solved the problem.

    Hopefully this will point somebody in the right direction if the above methods do not work.

    链接地址: http://www.djcxy.com/p/90434.html

    上一篇: 克隆分支时:在上游原点找不到远程分支

    下一篇: 创建新的远程分支时出现有趣的refname错误