HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 23:11:29 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100302141347
location: https://web.archive.org/web/20100302141347/https://github.com/guides/remove-a-remote-branch
server-timing: captures_list;dur=0.582760, exclusion.robots;dur=0.016721, exclusion.robots.policy;dur=0.007808, esindex;dur=0.014421, cdx.remote;dur=49.532464, LoadShardBlock;dur=172.937213, PetaboxLoader3.datanode;dur=56.430873, PetaboxLoader3.resolve;dur=57.273148
x-app-server: wwwb-app219
x-ts: 302
x-tr: 245
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app219; 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 23:11:30 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Tue, 02 Mar 2010 14:13:46 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "1929a72be14e26d067a8ae7910be318a"
x-archive-orig-x-runtime: 99ms
x-archive-orig-content-length: 8464
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: Tue, 02 Mar 2010 14:13:47 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="Wed, 17 Feb 2010 11:55:59 GMT", ; rel="memento"; datetime="Tue, 02 Mar 2010 14:13:47 GMT", ; rel="next memento"; datetime="Sun, 28 Mar 2010 01:32:08 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_14_20100302075408_crawl102-c/51_14_20100302141150_crawl101.arc.gz
server-timing: captures_list;dur=0.466192, exclusion.robots;dur=0.017850, exclusion.robots.policy;dur=0.008779, esindex;dur=0.011308, cdx.remote;dur=28.493812, LoadShardBlock;dur=533.273002, PetaboxLoader3.datanode;dur=480.803594, PetaboxLoader3.resolve;dur=171.725824, load_resource;dur=199.329171
x-app-server: wwwb-app219
x-ts: 200
x-tr: 797
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 , about 1 month 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