创建新的远程分支时有趣的重命名错误 [英] funny refname error when creating a new remote branch

查看:344
本文介绍了创建新的远程分支时有趣的重命名错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在github上得到了一个项目,一切都是花花公子。现在我想创建一个新的分支。



这是我所做的:


  1. 创建了一个新的本地分支

  2. 将新分支推送到github

问题:
在推送到我的远程,我得到这个错误:

 存储库ssh:// git @ github .com /< username> /ProjectColossus.git 

有趣的refname
错误:拒绝创建有趣的ref'workingBranch'远程

我的远程repo被称为origin,所以我已经尝试使用这个refname,在另一个答案这里stackoverflow,但我得到相同的错误。在远程推送之前,我还尝试使用与我的新本地分支相同的名称,在目标参考名称:字段中,但我真的不知道我在做什么。我知道有一些我没有得到关于git远程推送,所以一点点解释将是超级有用的。我很喜欢git和版本控制,但我是一个中级程序员(从1月份开始的第二年CS)。

解决方案

  refs / heads / name_of_your_new_branch $ b $在目标参考名称中,可能您必须添加参考/ b  

在具体情况下:

 code> refs / heads / workingBranch 

(至少是Bitbucket的方式 - egit,Eclipse的Eclipse插件)


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://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)

这篇关于创建新的远程分支时有趣的重命名错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆