on-internet
← Community

GIT: add only some files from remote repository as submodule

Stack Overflow ·

I need to add some JS library to my project and I also want to have ability to update that library from it's repo (that's why I'm adding it as submodule). But I need only on 1 file from that repo to be placed withing my JS directory, whereas library repository contain tests, coffeescript sources and so on, which I do not need in my repository. So the question is - how to add not whole repo as submodule, but single file/directory from it? I suppose this is somehow possible with help of Git Sparse checkouts but not sure if I'm on the right way with this...

Comments

Sign in or sign up to comment and upvote.

No comments yet.