I saw previous posts asking about this, but none that solved it for me. I don’t use Git through the command line, I use it as it’s integrated into Xcode. I created a branch and pushed it to GitHub, and now I want to delete it. I deleted it in Xcode, but it’s still on GitHub. The GitHub directions say to just go to Admin and delete the repo, but there it says it’ll delete the whole project, not just the branch. So what am I missing?
Share
You want to delete a branch on github? Just do
where you have to substitute
originwith the name of the remote repository andbranch-namewith the name of the branch you want to delete at github.Edit: Note the colon in front of the branch name, it is important.
Edit 2: To be more verbose:
Pick the remote name from the first column which corresponds to
the github URL where you want to delete the branch. I call it
originhere.branch-nameis the name of the branch you want to delete. Delete it using:Edit 3: If you want to learn about git, I can recommend the free book by Scott Chacon. The relevant section is here.