I have a directory structure like this:
../dir1/dev/project1/... /project2/... /project3/... /production/
I have dev (and all its subdirectories) checked on git (and github). Everything works well.
I would like to use github to deploy only project2, checking (or pulling, or something else) in my production directory. (And in particular, I want to check the tag.) That way, this will lead to ../dir1/production/project2
I am not a git expert, but I read a bunch of it online, and it seems like a โrare checkโ is what I need. I have tried various combinations of instructions here and here and here .
I basically did:
mkdir <repo> && cd <repo> git init git remote add โf <name> <url> git config core.sparsecheckout true echo /project2/ >> .git/info/sparse-checkout
When I do git pull <remote> TAGNAME , I get fatal: The remote end hung up unexpectedly .
When I do a git checkout TAGNAME , I get error: Sparse checkout leaves no entry on working directory .
What am I doing wrong?
Ross r
source share