cmsrel CMSSW_7_4_7
cd CMSSW_7_4_7/src
cmsenv
# create empty repository (with the cmssw trick to keep the repository small)
git cms-init
# add the central CMG repository, and fetch it
git remote add cmg-central https://github.com/CERN-PH-CMG/cmg-cmssw.git
git remote add cmgward git@github.com:wardVD/cmg-cmssw.git
git fetch cmg-central
git fetch cmgward
git config core.sparsecheckout true
cp /afs/cern.ch/user/c/cmgtools/public/sparse-checkout_74X_heppy .git/info/sparse-checkout
echo "/CMGTools/ObjectStudies/" >> .git/info/sparse-checkout
echo "/DataFormats/FWLite/" >> .git/info/sparse-checkout
echo /PhysicsTools/PatUtils/ >> .git/info/sparse-checkout
echo /JetMETCorrections/Type1MET/ >> .git/info/sparse-checkout
echo /PhysicsTools/PatAlgos/ >> .git/info/sparse-checkout
git checkout -b CMGTools-from-CMSSW_7_4_7_Stops-Dilepton
git merge cmgward/CMGTools-from-CMSSW_7_4_7_Stops-Dilepton
git branch heppy_74X cmg-central/heppy_74X #Branch for heppy developments
git gc --prune=now
#compile
cd $CMSSW_BASE/src
git cms-addpkg FWCore/Version
scram b -j 8
# add your mirror (see https://twiki.cern.ch/twiki/bin/viewauth/CMS/CMGToolsGitMigration#Prerequisites )
git remote add origin git@github.com:YOUR_GITHUB_REPOSITORY/cmg-cmssw.git
You can then merge or rebase the branch containing your existing developments on top of this release.
To get updates
git fetch cmg-central
git checkout CMGTools-from-CMSSW_7_4_7_Stops-Dilepton
git merge cmg-central/CMGTools-from-CMSSW_7_4_7
#then, you resolve the conflicts (if any)
git push cmgward CMGTools-from-CMSSW_7_4_7_Stops-Dilepton