Update submodule foreach with GitPython

submodule_update.py


import git

repo = git.Repo(PATH_TO_REPO)

for sub in repo.submodules:
			sub.update(recursive=True, init=True, to_latest_revision=True,progress=None, dry_run=False)

I haven't tested it, but it's probably like this.

Recommended Posts

Update submodule foreach with GitPython
Bulk update with pip (with confirmation)
How to update with SQLAlchemy?
Implementation of Bulk Update with mongo-go-driver
Replace dictionary value with Python> update ()