Skip to content

Instantly share code, notes, and snippets.

@jeferwang
Forked from nicktoumpelis/repo-rinse.sh
Last active June 11, 2022 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeferwang/0137bc241e32c7d78c5bfa123bd58646 to your computer and use it in GitHub Desktop.
Save jeferwang/0137bc241e32c7d78c5bfa123bd58646 to your computer and use it in GitHub Desktop.
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
git reset --hard
git submodule sync --recursive
git submodule update --init --force --recursive
git clean -ffdx
git submodule foreach --recursive git clean -ffdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment