Home > OS >  Configure TortoiseGit to pull all submodules when pulling superproject
Configure TortoiseGit to pull all submodules when pulling superproject

Time:12-02

I'm looking for a 1 click option in TortoiseGit for pulling the parent project as well as updating all the submodules to point to the latest HEAD. I know you can do the following after a pull with the drop down menu . . .

enter image description here

Is there a way to integrate the Update Submodules command to run automatically after a pull command? Or git-config option? Or server side option? Or script hook option?

I see the hook options in the TortoiseGit settings but only for commit and push commands, nothing for pull . . .

enter image description here

Right now I'm just executing a script with a few git commands to accomplish what I want. Here's the commands that I'm running in the script at the moment that works . . .

git submodule foreach git checkout master
git submodule foreach git pull
git pull origin

I was wondering if there was something in TortoiseGit that would accomplish the same thing?

EDIT: response to MrTux

enter image description here

CodePudding user response:

You could configure Git to update submodules on pull automatically: git config submodule.recurse true or git config --global submodule.recurse true.

How the modules are updated (to which branch etc.) can be controlled using .gitmodules

As of TortoiseGit 2.13 there is no support for git submodule foreach git pull

  • Related