Skip to content

Instantly share code, notes, and snippets.

View lee-at-work's full-sized avatar
💭
🇲🇾❤️🇩🇰

KY Lee lee-at-work

💭
🇲🇾❤️🇩🇰
View GitHub Profile
@dingzeyuli
dingzeyuli / check_github_repo_size
Created December 16, 2016 22:34
Check the size of a github repo before downloading
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning
# tested on macOS
echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size
# output:
# "size": 1746294,
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive