github — how to clone specific directory (not just release)?
I want these files:
but that URL does not work with clone, so I can’t figure out how to get them.
- How to use multiple nested private node modules?
- GIT: Changes to directory
- Using GitHub, how do I enable the function that requires me to login every time I push
- GitHub Enterprise vs. Team Foundation Server (TFS)
- manage multiple github repos from the same system and different user names
- Does Go development require a paid Github account for private development?
I can clone this parent URL:
but that does not seem to have the files I want.
So how can I get that specific 3.1.1 release?
UPDATE: Issue solved. My question assumed that git allows you to clone a specific directory in the repo (and not have to also clone all the other directories you don’t care about). I now realize git just doesn’t support that; you apparently have to clone the entire repo and then just cd into the directory you want.
2 Solutions collect form web for “github — how to clone specific directory (not just release)?”
Release v3.1.1 is essentially a tag.
You can clone using that tag:
git clone --branch v3.1.1 https://github.com/angular-ui/ui-grid.info.git
git clone --branch v3.0.5 https://github.com/angular-ui/ui-grid.info.git
To clone “Release 3.0.5”
See How to git clone a specific tag
You can clone anything you want with GIT.
Branches tags, commit and so on.
You simply have to pass the right parameter to the
Gow to clone specific branch? (-b flag)
# use the -b flag to clone a specifc branch git clone -b <branch> <remote_repo>
Clone only the history leading to the tip of a single branch, either specified by the
--branchoption or the primary branch remote’s
Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning.
HEADat the remote did not point at any branch when
--single-branchclone was made, no remote-tracking branch is created.
git checkout tags/<tag name>
Clone the repo and then checkout the desired tag:
# Checkout specific tag and create branch with the desired name git checkout tags/<tag_name> -b <tag_name>