Skip to content

Instantly share code, notes, and snippets.

@vinloo
Created November 25, 2021 13:35
Show Gist options
  • Select an option

  • Save vinloo/fe9efeb56da817b5644c77a3492f5903 to your computer and use it in GitHub Desktop.

Select an option

Save vinloo/fe9efeb56da817b5644c77a3492f5903 to your computer and use it in GitHub Desktop.
GitHub backup all repos
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