Skip to content

Instantly share code, notes, and snippets.

@sofaking
Created November 23, 2017 16:22
Show Gist options
  • Save sofaking/80ef29c08a26b057e9e3a6430dfe1d44 to your computer and use it in GitHub Desktop.
Save sofaking/80ef29c08a26b057e9e3a6430dfe1d44 to your computer and use it in GitHub Desktop.
Reset a git repository with submodules to initial state
git submodule foreach --recursive git reset --hard
git reset --hard
git submodule update --init
git submodule foreach --recursive git submodule update --init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment