Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking out subdirs of a private repository #795

Closed
abonato opened this issue Sep 11, 2013 · 1 comment
Closed

Checking out subdirs of a private repository #795

abonato opened this issue Sep 11, 2013 · 1 comment

Comments

@abonato
Copy link

abonato commented Sep 11, 2013

Hi everybody,

I would like to check out only some subdirs of the repository
https://github.com/cms-edbr/ExoDiBosonResonances

Let's say that I want only EDBRCommon and EDBRElectron .
Reading the instructions in
https://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html#_sparse_checkout

I did the following:
#1 : checkout a package, just to initialize the git area

-$>git cms-addpkg FWCore/Version

No release tags specified, using default CMSSW_6_2_0_pre8.
You are on branch CMSSW_6_2_X
Checking out FWCore/Version in tag CMSSW_6_2_0_pre8.
Cloning into '/afs/cern.ch/work/b/bonato/test_git2/CMSSW_6_2_0_pre8/src'...
remote: Counting objects: 836, done.
remote: Compressing objects: 100% (227/227), done.
remote: Total 299 (delta 245), reused 123 (delta 69)
Receiving objects: 100% (299/299), 49.73 KiB | 0 bytes/s, done.
Resolving deltas: 100% (245/245), completed with 222 local objects.
Branch from-CMSSW_6_2_0_pre8 set up to track remote branch CMSSW_6_2_X from official-cmssw.
Switched to a new branch 'from-CMSSW_6_2_0_pre8'
HEAD is now at 57ba31a Test package for the tutorial.
#2 : edit .git/info/sparse-checkout

-$>emacs -nw .git/info/sparse-checkout

I added these two lines

/ExoDiBosonResonances/EDBRCommon
/ExoDiBosonResonances/EDBRElectron
#3 : clone the ExoDiBosonResonances repository from the master

git clone git://github.com/cms-edbr/ExoDiBosonResonances

The final result includes all subdirectories, git completely ignored it.
How can it be achieved ?

Many thanks,
Alessio

@ktf
Copy link
Contributor

ktf commented Nov 26, 2014

Ciao Alessio, I assume by now this is understood? Apparently we never closed this. Closing. Reopen if not ok.

@ktf ktf closed this as completed Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants