I am trying to check out a specific file (.gitignore) committed to my git branch, and no other files.
I am able to use
git checkout origin/master "build/system/.gitignore"
,
but when I use
git checkout origin/master ".gitignore"
this doesn't work. (I get the error "error: pathspec '.gitignore' did not match any file(s) known to git.)
I have a sparse checkout of git where currently only certain directories are included in my checkout. I would like to include certain files as well.
Is this possible, and if so, how?