Created
December 2, 2020 15:02
-
-
Save dhoko/530112ebb509dc68c1eb3739e6104a2f to your computer and use it in GitHub Desktop.
Create a local copy of all remote branches for a repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-remote --heads | awk -F '/' '{ print $NF }' | while read -r name; do | |
echo "[${name}]"; | |
git fetch origin "${name}:${name}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment