
If you are developing the submodule as well you can use either -merge or -rebase as convenience branch = double-brackets path = newbats/bats url = path = t/test_helper/bats-assert url = path = t/test_helper/bats-support url = Developing In Submodule If you didn’t specify any branches and used -remote it will automatically fetch master branch.
#GIT ADD REMOTE SUBMODULE UPDATE#
gitmodules file and use git submodule update -remote If you want to use a branch in the submodule (for example stable branches) you will have to add branch on. gitmodules also git submodule sync # Adding -recursive here will also update the submodule's submodule if it exists Checkout a specific branch on submoduleīy default your submodule will check out the specific rev of a repository during the time of its commit to the main repository. gitmodules file cd ~/repository git submodule update -init # Adding -recursive here will also update the submodule's submodule if it exists Update the repository url on. Git submodules are actually using the commit rev of another repository and you will need to push these changes to your main repo if you want to updgrade them. Make sure to check submodule status once removed. git/config rm -rf submodule-dir/ git add git commit -m "removing submodule" gitmodule file and you may not want to commit it and most of the time you will only be using git submodule update -init since it will be more consistent with the SCM Delete unused Submodule Remove referencing lines in. Please note this will change the entry in the.

where the submodule will be stored on your local clone use git submodule init git mv oldpath/submodule newpathsubmodule git submodule update


If you want to update the path of the submodule (i.e. Git clone -recursive Create a submodule in a currently existing repo git submodule add git submodule update -init # Adding -recursive here will also update the submodule's submodule if it exists git commit -m 'Added new submodule at ' Photo by Yancy Min on Unsplash Clone repo with submodules included
