Skip to content

Instantly share code, notes, and snippets.

@bsidhom
Created July 17, 2018 18:14
Show Gist options
  • Save bsidhom/32774f0a4b281fad42d0db155865d655 to your computer and use it in GitHub Desktop.
Save bsidhom/32774f0a4b281fad42d0db155865d655 to your computer and use it in GitHub Desktop.
Update each submodule to the latest version of `origin`'s default branch
#!/usr/bin/env bash
git submodule foreach 'git fetch origin && git checkout $(git symbolic-ref refs/remotes/origin/HEAD)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment