File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
56
56
- [ Checkout Old Version Of A File] ( git/checkout-old-version-of-a-file.md )
57
57
- [ Checkout Previous Branch] ( git/checkout-previous-branch.md )
58
58
- [ Clean Out All Local Branches] ( git/clean-out-all-local-branches.md )
59
+ - [ Clean Up Old Remote Tracking References] ( git/clean-up-old-remote-tracking-references.md )
59
60
- [ Delete All Untracked Files] ( git/delete-all-untracked-files.md )
60
61
- [ Determine The Hash Id For A Blob] ( git/determine-the-hash-id-for-a-blob.md )
61
62
- [ Dry Runs in Git] ( git/dry-runs-in-git.md )
Original file line number Diff line number Diff line change
1
+ # Clean Up Old Remote Tracking References
2
+
3
+ After working on a Git-versioned project for a while, you may find that
4
+ there are a bunch of references to remote branches in your local repository.
5
+ You know those branches definitely don't exist on the remote server and
6
+ you've removed the local branches, but
7
+ you still have references to them lying around. You can reconcile this
8
+ discrepancy with one command:
9
+
10
+ ``` bash
11
+ $ git fetch origin --prune
12
+ ```
13
+
14
+ This will prune all those non-existent remote tracking references which is
15
+ sure to clean up your git log (` git log --graph ` ).
16
+
17
+ [ source] ( http://stackoverflow.com/a/3184742/535590 )
You can’t perform that action at this time.
0 commit comments