version control - Git pull only contents of a repository -


is there way git pull contents of repository without pulling home folder? example have bunch of files in repository called "sample" want pull contents of "sample" local repository called "local." not want pull "sample" such get: local -> sample -> [contents]. there way pull contents?

i'm asking because operating on shared web server requires place content under specific folder (and named file names within folder).

thanks.

edit: wasn't being quite clear before. i'm working on local machine such only allowed change contents of folder , not contents of folder contains folder.

option 1::

git clone <repo_path> <folder name>

so in case, git clone sample.git local

option 2::

the folder-name local repo present not have same of remote.

do git clone ...

git clone repo_pathorurl

then rename folder

so instance have sample.git remote repository, do

git clone sample.git

this clone repository in folder called sample on local machine. rename folder liking, in case local, , continue regular git pull , push.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -