Skip to content

Instantly share code, notes, and snippets.

View beaulac's full-sized avatar

antoine beauᵛᵃᴵˢ⁻lacᵃˢˢᵉ beaulac

View GitHub Profile
@beaulac
beaulac / gist:e960baaad1e7138397538d824045d2e5
Created May 19, 2017 01:15 — forked from sumardi/gist:5559896
Subdirectory checkouts with Git sparse-checkout
# New repository
mkdir <repo> && cd <repo>
git init
git remote add –f <name> <url>
git config core.sparsecheckout true
echo some/dir/ >> .git/info/sparse-checkout
echo another/sub/tree >> .git/info/sparse-checkout
git pull <remote> <branch>
# Existing repository