Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaChandra
Last active February 18, 2022 02:28
Show Gist options
  • Save ChaitanyaChandra/7f5c3e7dba67a3e4404d04827328a40f to your computer and use it in GitHub Desktop.
Save ChaitanyaChandra/7f5c3e7dba67a3e4404d04827328a40f to your computer and use it in GitHub Desktop.
shell script to clone all github repo
# you need to install gh (github api)
# windows : choco install gh
# mac : brew install gh
username="ChaitanyaChandra" # user name or org name is required
limit=100
gh repo list $username --limit $limit | awk '{print $1}' > out.txt
while read -r line; do echo "git clone https://github.com/$line.git" >> final.sh ; done < out.txt
chmod +x final.sh
./final.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment