简体   繁体   English

无法将分支推送到github

[英]Can't push branch to github

I forked a github repo and cloned the fork to my machine. 我分叉了一个github仓库,并将叉子克隆到了我的机器上。 Then I created a new branch from master called #25 (the issue's ID I want to fix). 然后,我从master创建了一个名为#25的新分支(我要解决的问题ID)。 I fixed the bug and commited to by branch. 我修复了该错误,并按分支提交。 Now I'm trying to push this branch to github, so I can send a pull request, but it doesn't work. 现在,我正在尝试将该分支推送到github,以便可以发送拉取请求,但它不起作用。 Even though I followed the instructions, the branch won't show up on github. 即使按照说明进行操作,该分支也不会显示在github上。

$ git push origin #25
Everything up-to-date

I'm on the correct branch: 我在正确的分支上:

$ git branch
* #25
  master

And the commit was also successful: 提交也成功了:

$ git log
commit 083f15035feab5af1673ed3685e10cca6e24aeeb
Author: John Example <johnexample@gmail.com>
Date:   Wed Dec 5 14:53:16 2012 +0100

    Fixed #25: Window now correctly resizes to fullscreen.

What am I doing wrong? 我究竟做错了什么?

# - is a symbol used to prefix any comments ie #-是用于在任何注释前添加前缀的符号,即

$ ls
$ ls #holymotherofgod

Are exactly the same 完全一样

You have to escape it 你必须逃避它

$ git push origin \#25

也许尝试

git flow feature finish #25

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM