Friday, July 28, 2017

git checkout specific folder from a repository

git command to checkout specific folder from git repo.
This sample command is for checkout a folder "restapi-jsonformat" from repo to lampp htdocs folder.

cd /opt/lampp/htdocs
git init
git remote add -f origin https://github.com/phpprjin/networking.git
git config core.sparseCheckout true
echo "restapi-jsonformat" >> .git/info/sparse-checkout
git pull origin master


No comments:

Post a Comment