You can checkout a particular package in CMSSW by calling:

git cms-addpkg L1Trigger/L1TMuonEndCap

(see CMSSW FAQ).

But if you happen to remove the package later, the next time you call git status, all the files in the package will show up as “deleted”. To remedy this, notice that what git cms-addpkg really does is a git sparse-checkout operation. So, you can edit the internal file .git/info/sparse-checkout to remove the package name from the file, then call:

git read-tree -mu HEAD

Now, your local git working area should return to the state before you had called git cms-addpkg.