![]() ![]() ![]() On GitHub, the rock folder icon will have a little indicator showing that it is a submodule:Īnd clicking on the rock folder will take you over to the rock repository. If everything looks good, you can commit this change and you’ll have a rock folder in the slingshot repository with all the content from the rock repository. Newer versions of Git will do this automatically, but older versions will require you to explicitly tell Git to download the contents of rock: git submodule update -init -recursive In the slingshot repository: git submodule add rockĪt this point, you’ll have a rock folder inside slingshot, but if you were to peek inside that folder, depending on your version of Git, you might see … nothing. You can add rock as a submodule of slingshot. You’ve got code for y-shaped stick and a rubber-band.įlickr photo shared by under a Creative Commons ( BY ) licenseĪt the same time, in another repository, you’ve got another project called Rock-it’s just a generic rock library, but you think it’d be perfect for Slingshot. Let’s say you’re working on a project called Slingshot. Submodules allow you to include or embed one or more repositories as a sub-folder inside another repository.įor many projects, submodules aren’t the best answer (more on this below), and even at their best, working with submodules can be tricky, but let’s start by looking at a straight-forward example. Git provides submodules to help with this. Eventually, any interesting software project will come to depend on another project, library, or framework. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |