StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Home
  2. Companies
  3. Git
Git logo

Git

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

git-scm.com
0
Tools
1
Decisions
160.6K
Followers

Tech Stack

No tools found in this company's stack yet.

Engineering Blog

Stack Decisions

peter jackman
peter jackman

Apr 25, 2019

Delete a Git branch remotely.

Suppose you’re done with a remote branch — say, you and your collaborators are finished with a feature and have merged it into your remote’s master branch (or whatever branch your stable code-line is in). You can delete a remote branch using the rather obtuse syntax git push [remotename] :[branch]. If you want to delete your server-fix branch from the server, you run the following:

To git@github.com:schacon/simplegit.git
 - [deleted]         serverfix```

Boom. No more branch on your server. You may want to dog-ear this page, because you’ll need that command, and you’ll likely forget the syntax. A way to remember this command is by recalling the ```git push [remotename] [localbranch]:[remotebranch]``` syntax that we went over a bit earlier. If you leave off the ```[localbranch]``` portion, then you’re basically saying, “Take nothing on my side and make it be ```[remotebranch].”```

I issued ```git push origin :bugfix``` and it worked beautifully. Scott Chacon was right—I will want to dog-ear that page (or virtually dog ear by answering this on Stack Overflow).

Then you should execute this on other machines

```git fetch --all --prune```


Thanks & Regards

[Reset SBCGlobal](https://passwordrecoverysupport.us/reset-SBCGlobal.php)
6 views6
Comments