posts:git:notes: mention `git remote prune`
authorW. Trevor King <wking@tremily.us>
Fri, 7 Dec 2012 13:20:54 +0000 (08:20 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Dec 2012 13:20:54 +0000 (08:20 -0500)
posts/Git/notes.org

index 85e1993a147c027eeda888b141b08d445b78bb9c..c134b98000d486623e630914c5022afb2d8165df 100644 (file)
@@ -1426,6 +1426,18 @@ Combining these into one command using Bash's command substitution:
 
     : $ git tag junio-gpg-pub $(git hash-object -w my-file)
 
+** Prune remote tracking branches
+
+Sometimes an upstream remote will remove branches, and you'll be left
+with stale remote-tracking branches.  You can clean them up with
+=remote prune=:
+
+    : $ git remote prune origin
+    : Pruning origin
+    : URL: git://git.kernel.org/pub/scm/git/git.git
+    :  * [pruned] origin/html
+    :  * [pruned] origin/man
+
 * Troubleshooting
 ** Git commit hangs with no output