Daniel
Daniel

Reputation: 3868

How to remove an unused GIT branch in Xcode?

I can see how to create a branch, but I would like to remove one that I will never use. There doesn't seem to be such functionality in Xcode, so I tried in terminal doing

git branch -d BugFixes

but no luck.

Upvotes: 6

Views: 7218

Answers (2)

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

You can delete git branches in Xcode. Choose Source Control > WorkingCopy > Configure WorkingCopy, where WorkingCopy is the name of your working copy, which is usually the name of your project. A sheet opens. Click the Branches button at the top of the sheet. Select a branch and click the minus button at the bottom to remove the branch. Note that Xcode does not let you remove the current branch.

enter image description here

Xcode 9 Update

Apple moved the user interface for branches to the source control navigator in Xcode 9.

enter image description here

To delete a branch, select it, right-click, and choose Delete. You cannot delete the current branch.

Upvotes: 22

John Diaz
John Diaz

Reputation: 361

please try:

for local: git branch -D BugFixes for remote: git push origin :BugFixes

Upvotes: 4

Related Questions