HTTP/2 302
server: nginx
date: Tue, 23 Dec 2025 19:17:48 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100130105921
location: https://web.archive.org/web/20100130105921/https://github.com/guides/remove-a-remote-branch
server-timing: captures_list;dur=0.533737, exclusion.robots;dur=0.046106, exclusion.robots.policy;dur=0.035510, esindex;dur=0.010100, cdx.remote;dur=10.524416, LoadShardBlock;dur=370.010722, PetaboxLoader3.datanode;dur=160.325882, PetaboxLoader3.resolve;dur=36.354935
x-app-server: wwwb-app218-dc8
x-ts: 302
x-tr: 403
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app218; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 23 Dec 2025 19:17:50 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sat, 30 Jan 2010 10:59:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "3bd38364690a4624928cca6738df6b78"
x-archive-orig-x-runtime: 89ms
x-archive-orig-content-length: 8466
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 30 Jan 2010 10:59:21 GMT
link:
; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_14_20100130064131_crawl100-c/51_14_20100130105823_crawl101.arc.gz
server-timing: captures_list;dur=0.515667, exclusion.robots;dur=0.019211, exclusion.robots.policy;dur=0.008258, esindex;dur=0.010899, cdx.remote;dur=5.718683, LoadShardBlock;dur=992.912911, PetaboxLoader3.datanode;dur=862.211334, PetaboxLoader3.resolve;dur=418.871060, load_resource;dur=326.195449
x-app-server: wwwb-app218-dc8
x-ts: 200
x-tr: 1363
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
Remove a remote branch - Guides - GitHub
Guides: Remove a remote branch
Removing a branch from your remote repo is a little bit different from removing it locally. It’s all about the colon:
git push <remote_repo> :heads/<branch>
Example: git push origin :heads/some-branch removes some-branch from the remote repo (apparently git push origin :some-branch works as well).
This works for removing a tag as well: git push origin :sometag
You might also want to check out git-publish-branch ‘s ’-d ’ option.
Other clones of the repo could still have references to the deleted remote branches. In order to delete these references the git remote prune <remote_repo> command can be used. Adding --dry-run will show you the branches that will be pruned. Alternatively you could use git gc --prune=now. If you want to delete tracking of one remote branch use git branch -rd <remote_repo>/<branch>
Last edited by Bertg , 3 days ago
Versions:
Current Version 11 by rdp Version 10 by chikamichi Version 9 by snipsnipsnip Version 8 by rdp Version 7 by rdp Version 6 by rdp Version 5 by seven1m Version 4 by alloy Version 3 by elliottcable Version 2 by josh Version 1 by josh