I think, therefore I am. I am, therefore I sail

Reset all git submodules

Here is a quick snippet that will reset all your git submodules to their most recent commit. Handy when something has happened such as a file permissions change that unintentionally affected the submodules.

git submodule foreach --recursive git reset --hard

Previous

Compare a single file between git branches

Next

Sneak peek at Zippey’s underside

1 Comment

  1. git submodule foreach git reset –hard HEAD git submodule update git submodule foreach “git checkout master; git pull” git submodule foreach git clean -f

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Beards