HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 02:32:07 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100328013208
location: https://web.archive.org/web/20100328013208/https://github.com/guides/remove-a-remote-branch
server-timing: captures_list;dur=0.805590, exclusion.robots;dur=0.027496, exclusion.robots.policy;dur=0.012824, esindex;dur=0.013741, cdx.remote;dur=145.388339, LoadShardBlock;dur=253.003169, PetaboxLoader3.datanode;dur=84.216444, PetaboxLoader3.resolve;dur=88.649366
x-app-server: wwwb-app216
x-ts: 302
x-tr: 436
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app216; path=/
x-location: All
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: Thu, 07 Aug 2025 02:32:08 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 28 Mar 2010 01:32:07 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "a2146d20a4156c5579c214df51575c91"
x-archive-orig-x-runtime: 445ms
x-archive-orig-content-length: 8475
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: Sun, 28 Mar 2010 01:32:08 GMT
link:
; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 06 Mar 2008 03:00:12 GMT", ; rel="prev memento"; datetime="Tue, 02 Mar 2010 14:13:47 GMT", ; rel="memento"; datetime="Sun, 28 Mar 2010 01:32:08 GMT", ; rel="next memento"; datetime="Wed, 14 Apr 2010 04:25:49 GMT", ; rel="last memento"; datetime="Sun, 04 Feb 2024 21:13:14 GMT"
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_15_20100327234701_crawl102_IndexOnly-c/51_15_20100328013110_crawl101.arc.gz
server-timing: captures_list;dur=0.591503, exclusion.robots;dur=0.020403, exclusion.robots.policy;dur=0.009619, esindex;dur=0.011578, cdx.remote;dur=18.947847, LoadShardBlock;dur=130.019629, PetaboxLoader3.datanode;dur=174.554778, PetaboxLoader3.resolve;dur=184.362480, load_resource;dur=235.172290
x-app-server: wwwb-app216
x-ts: 200
x-tr: 438
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
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 , 2 months 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