
I often use a larger Visual Studio solutions to handle a bunch of simple NuGet projects. And more often I only update references or NuGet packages.
But working with git submodules in VSCode and Visual Studio is still a pain in the apple….
Thanks got we have a foreach support inside of git submodule
So here is a simple snippet to update, commit and push all submodules inside a parent directory.
1# Add all changes
2git submodule foreach "git add ."
3# Commit all changes, use 'true' to ignore submodules without changes
4git submodule foreach "git commit -m 'Updated all NuGet references' || true"
5# Push all changes
6git submodule foreach "git push origin master"
For sure this wont work inside a team, because you cannot push to master. But for personal simple project I do not use any branch security / policy.
Related articles
Feb 08, 2017 - 2 min read
Git Flow mit Visual Studio Team Services
Git Flow Der Git Flow - früher ein Plugin, heute Bestandteil von Git - ist ein bewährter Workflow, wie mit Hilfe von Branches zusammen im …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.
