English 中文(简体)
我如何从Gite Hub删除一个分支?
原标题:How do I delete a branch from GitHub?
  • 时间:2012-04-25 14:00:30
  •  标签:
  • github

我看到以前曾有人要求这样做,但没有人会为我解决。 我没有通过指挥线使用Gite,而是把它当作X条码。 我设立了一个部门,将其推向Gite Hub,我现在要删除。 我删除了X条码中的这一编号,但它仍在Gite Hub。 吉特·霍特说,只是要去除,删除背书,但据指出,它不仅删除了整个项目。 因此,我失踪了吗?

最佳回答

请删除branch。 正义

$ git push origin :branch-name

您必须用遥远的存放处的名称和<代码>branch-name替换,代之以贵方希望删除的分行名称。

<><>Edit>: 必须指出,在分支名称前面的殖民地是重要的。

<><>><>>>> 更确切地说:

$ cd /path/to/local/git/checkout
$ git remote -v show

Pick the remote name from the first column which corresponds to the github URL where you want to delete the branch. I call it origin here. branch-name is the name of the branch you want to delete. Delete it using:

$ git push origin :branch-name

Edit 3: If you want to learn about git, I can recommend the free book by Scott Chacon. The relevant section is here.

问题回答

暂无回答




相关问题
GitHub SAML SSO ( cloud enterprise)

I wanted to integrate GitHub saml sso for the project. I have a custom IDP and from the SP initiated saml flow, like getting to the https://github.com/orgs/ORG-NAME/sso and then sso getting successful,...

How do I clone a github project to run locally?

I am trying to follow this railscast tutorial for authlogic - and it points to the source here - I have git installed - how do I replicate the source onto my localhost so that I can follow the ...

git push heroku master permission denied on VISTA

(Using Vista)I m trying to clone an app from my GitHub Repository and push it into Heroku. Okay, so I ve tried to create an SSH key so many times with this: `ssh-keygen -t rsa` It seems to go ...

SSH Public key denied on "git clone" command

I am trying to clone a git repo that I forked in my GitHub Repository.It s a rails app. I want to clone it on my local git so that I can push it onto heroku. I generated a set of rsa keys and copied ...

heroku using git branch is confusing!

Ok, so I have a big github project that i m not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but ...