561 B
561 B
title, type, language, tags, cover, dateModified
| title | type | language | tags | cover | dateModified | ||
|---|---|---|---|---|---|---|---|
| Delete detached branches | snippet | git |
|
brown-bird | 2021-04-13T21:10:59+03:00 |
Deletes all detached branches.
- Use
git fetch --all --pruneto garbage collect any detached branches. - This is especially useful if the remote repository is set to automatically delete merged branches.
git fetch --all --prune
git checkout master
git branch
# master
# patch-1
# patch-2
# Assuming `patch-1` is detached
git fetch --all --prune
git branch
# master
# patch-2