Jump to content

Clone content of Subdirectory of Git Repository


seeh
 Share

Recommended Posts

i was read "Clone Subdirectory of Git Repository" https://www.delftstack.com/howto/git/git-clone-subdirectory/

and so tried:

mkdir s9LocalRatings ; cd s9LocalRatings

git init

git remote add -f origin git@gitlab.com:sl5net/LocalRatings.git

git config core.sparsecheckout true

echo "LocalRatings/" >> .git/info/sparse-checkout

git pull origin master

as one-liner:

mkdir s1; cd s1; git init; git remote add -f origin git@gitlab.com:sl5net/LocalRatings.git; git config core.sparsecheckout true; echo "LocalRatings/" >> .git/info/sparse-checkout; git pull origin master

result:

that got me the LocalRatings folder (inside ....../mods/s9LocalRatings folder). nice :/ . but i want only the content of it ;(

any idea?

 

or maybe (in future) its possible to add/start a mode in 0ad from a sub/sub/..../sub-folder of the mods folder?

Edited by seeh
Link to comment
Share on other sites

  • seeh changed the title to Clone content of Subdirectory of Git Repository

workaround bit ugly maybe:

 

mkdir LocalRatingsSeeh_gitFullRepo; cd LocalRatingsSeeh_gitFullRepo;
git init; git remote add -f origin git@gitlab.com:sl5net/LocalRatings.git; git config core.sparsecheckout true; echo "LocalRatings/" >> .git/info/sparse-checkout; git pull origin master;
cd ..; ln -s ./LocalRatingsSeeh_gitFullRepo/LocalRatings/ ./LocalRatingsSeeh;

https://stackoverflow.com/a/74080665/2891692

 

Edited by seeh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...