![]() ![]() You 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. gitmodules submodule..That being said, on git submodule update -remote, you can make a submodule change its SHA1 by the latest of a given branch by following my answer 'git submodule tracking latest' For an existing submodule: git config -f. You can clone another repository into your project and keep your. 2 Answers Sorted by: 2 Note that a submodule only represents a fixed SHA1. 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. Use Git submodules to keep a Git repository as a subdirectory of another Git repository. 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. You can work with any submodule via your git client (as a regular repository). You commonly perform this task after you pull a change in the parent repository that updates the revision checked out in the submodule. 1 -b git submodule add -b master URL to Git repo 2.gitmodules DbConnector stable git config -f. Commit changes: git commit -am 'Remove submodule'. Performing a submodule update checks out that specific revision in the submoduleâs Git repository. In this case the Git parent repository tracks the commit that should be checked out in each configured submodule. Alternatively to the tracking of a branch, you can also control which commit of the submodule should be used. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |