Skip to content

Instantly share code, notes, and snippets.

@OleksandrKucherenko
Last active June 30, 2016 07:32
Show Gist options
  • Save OleksandrKucherenko/6541cd56f3532dab7190902be4d5e3bb to your computer and use it in GitHub Desktop.
Save OleksandrKucherenko/6541cd56f3532dab7190902be4d5e3bb to your computer and use it in GitHub Desktop.
Revert all submodules of the project to initial state.
#!/bin/bash
# wait for Enter key
function pause(){
read -p "$*"
}
echo ''
echo Reverting all submodules...
echo ''
# reset all changes in submodules
git submodule foreach --recursive git reset --hard
# revert changes in all submodules to initial state
git submodule update --init --recursive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment