Skip to content

Instantly share code, notes, and snippets.

@luigidifraia
Last active November 2, 2019 19:17
Show Gist options
  • Save luigidifraia/73a5331e3999a5e9d005e7000c11e1e7 to your computer and use it in GitHub Desktop.
Save luigidifraia/73a5331e3999a5e9d005e7000c11e1e7 to your computer and use it in GitHub Desktop.
Update git submodules that are detached from HEAD (tracking a specific commit)
#!/bin/bash
# From: https://stackoverflow.com/a/49997119
git submodule update
git submodule foreach git checkout master
git submodule foreach git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment