How to pull specific directory with git
- cd into the top of your repo copy
git fetch
git checkout HEAD path/to/your/dir/or/file
Where "
path/...
" in (3) starts at the directory just below the repo root containing your ".../file
"NOTE that instead of "HEAD", the hash code of a specific commit may be used, and then you will get the revision (file) or revisions (dir) specific to that commit.
In an empty directory:
git init
git remote add [REMOTE_NAME] [GIT_URL]
git fetch REMOTE_NAME
git checkout REMOTE_NAME/BRANCH -- path/to/directory