DEV Community


Posted on

Exploring git sparse checkout

get the remote url:
git config --get remote.origin.url

remove the remote url:
git remote remove origin

enable sparse checkout:
git config core.sparsecheckout true

add the remote:
git remote add -f origin

select the directories you want to checkout:
echo /wiki/tools/ >> .git/info/sparse-checkout

pull from the remote:
git pull origin master

using git sparse checkout:,You%20should%20now%20have%20the%20contrib%2Fcompletion%20directory.%20

git docs on sparse checkout:

getting your remotes:

Top comments (0)