Created
November 25, 2021 13:35
-
-
Save vinloo/fe9efeb56da817b5644c77a3492f5903 to your computer and use it in GitHub Desktop.
GitHub backup all repos
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
| USERNAME=vinloo | |
| repos=( | |
| "repo-1" | |
| "repo-2" | |
| "repo-3" | |
| "etc" | |
| ) | |
| rm -rf "GitHub Backup" | |
| mkdir "GitHub Backup" | |
| cd "GitHub Backup" | |
| for repo in "${repos[@]}" | |
| do | |
| echo "Backing up $repo..." | |
| git clone "git@github.com:$USERNAME/$repo.git" | |
| done | |
| echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment