3/21/2023 0 Comments Git submoduleYou can also change the commit that is checked out in each submodule by performing a checkout in the submodule repository and then committing the change in the parent repository. This is common when you are experimenting with different checked out branches or tags in the submodule and you want to restore it back to the commit tracked by the parent repository. Performing a submodule update is also useful when you want to restore your submodule’s repository to the current commit tracked by the parent repository. This shot covers what needs to be done when you delete a project that. You would then fetch the latest changes in the submodule’s Git repository and perform a submodule update to check out the current revision referenced in the parent repository. Git submodules are a powerful way to use Git as an external dependency management tool. You commonly perform this task after you pull a change in the parent repository that updates the revision checked out in the submodule. Performing a submodule update checks out that specific revision in the submodule’s Git repository. Starting with Submodules We’ll walk through developing a simple project that has been split up into a main project and a few sub-projects. This lets you clone another repository into your project and keep your commits separate. In this case the Git parent repository tracks the commit that should be checked out in each configured submodule. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. Alternatively to the tracking of a branch, you can also control which commit of the submodule should be used. Each submodule is a proper full-fledged git repository, so any git commands executed within the folders of the submodule will affect. Git, the world’s most popular version control system, offers a great way to manage these dependencies in an elegant, robust way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |