github

Backing up GitHub

Cloning all repositories for a username

Run the following command, replacing username with the username, to clone all of the GitHub repositories for that user to the current directory.

curl "https://api.github.com/users/username/repos?page=1&per_page=100" | grep -e 'git_url*' | cut -d \" -f 4 | xargs -L1 git clone

This will only clone the first 100 repositories.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow