Prune Remote Git Branches

Git is a wonderful version control system. It’s light, nimble, and fast. It makes managing code amongst many developers a dream.
Unfortunately it has a fair share of quirks.
One of the quirkiest quirks that I’ve run into a couple times now is an issue …


This content originally appeared on Harry Wolff and was authored by Harry Wolff

Git is a wonderful version control system. It’s light, nimble, and fast. It makes managing code amongst many developers a dream.

Unfortunately it has a fair share of quirks.

One of the quirkiest quirks that I’ve run into a couple times now is an issue with remote git branches.

When a remote git branch is deleted from the server your local repository doesn’t update its references.

The easy solution is to run this command:

<code>git remote prune origin</code>

This prunes and removes all remote branches that no longer exist.

<a href="http://kpumuk.info/development/memo-2-useful-git-tricks-with-remote-branches/">Full credit to Dmytro Shteflyuk for this tip.</a>


This content originally appeared on Harry Wolff and was authored by Harry Wolff


Print Share Comment Cite Upload Translate Updates
APA

Harry Wolff | Sciencx (2011-10-13T11:41:06+00:00) Prune Remote Git Branches. Retrieved from https://www.scien.cx/2011/10/13/prune-remote-git-branches/

MLA
" » Prune Remote Git Branches." Harry Wolff | Sciencx - Thursday October 13, 2011, https://www.scien.cx/2011/10/13/prune-remote-git-branches/
HARVARD
Harry Wolff | Sciencx Thursday October 13, 2011 » Prune Remote Git Branches., viewed ,<https://www.scien.cx/2011/10/13/prune-remote-git-branches/>
VANCOUVER
Harry Wolff | Sciencx - » Prune Remote Git Branches. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2011/10/13/prune-remote-git-branches/
CHICAGO
" » Prune Remote Git Branches." Harry Wolff | Sciencx - Accessed . https://www.scien.cx/2011/10/13/prune-remote-git-branches/
IEEE
" » Prune Remote Git Branches." Harry Wolff | Sciencx [Online]. Available: https://www.scien.cx/2011/10/13/prune-remote-git-branches/. [Accessed: ]
rf:citation
» Prune Remote Git Branches | Harry Wolff | Sciencx | https://www.scien.cx/2011/10/13/prune-remote-git-branches/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.