Investigate usage of sparse checkout
Old solution
mkdir mcjoboptions
cd mcjoboptions
git init
git remote add -f origin ssh://git@gitlab.cern.ch:7999/atlas-physics/pmg/mcjoboptions.git
git config core.sparseCheckout true
echo scripts > .git/info/sparse-checkout
echo common >> .git/info/sparse-checkout
echo .gitignore >> .git/info/sparse-checkout
git pull origin master
This works - notice that the 700xxx
directory is not cloned - the script automatically finds the correct DSID directory that should be created
New solution
Needs git 2.26 or higher
mkdir mcjoboptions
cd mcjoboptions
git init
git remote add -f origin ssh://git@gitlab.cern.ch:7999/atlas-physics/pmg/mcjoboptions.git
git sparse-checkout init
git sparse-checkout set common scripts .gitignore
git pull origin master
Edited by Spyros Argyropoulos