Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 368
Daniel Avatar asked Nov 29 '22 06:11

Daniel


2 Answers

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.

like image 96
Swift Dev Journal Avatar answered Dec 04 '22 05:12

Swift Dev Journal


please try:

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

like image 27
John Diaz Avatar answered Dec 04 '22 06:12

John Diaz