Quick Tip: Delete Remote Git Branches
Not exactly a new thing, but one I have always had to Google for. In my workflow I normally create a new branch when working on a major feature change (this ensures if I have any bug fixes to do in the mean time I can work on them without having to muddle around code). It gets pushed to GitHub so my other developers can work on it as well. When it’s released I usually merge back into my develop branch and ultimately into my master branch. So deleting the local branch is easy, probably because I always Git Tower or the GitHub Mac App. How the hell do I delete this now defunct branch from GitHub?
git push <remote> :<branch_name>
On this occasion for me it was:
git push origin :2012
You learn something new everyday. I should have learnt this a long time ago but only started using Git after attending last year’s Cakefest!
Filed under Developer. No comments, on purpose.