Skip to content

Instantly share code, notes, and snippets.

@splincode
Forked from nicktoumpelis/repo-rinse.sh
Created July 31, 2023 14:17
Show Gist options
  • Save splincode/032fac8b37c4cbd5e4f4a3f34f1d7b06 to your computer and use it in GitHub Desktop.
Save splincode/032fac8b37c4cbd5e4f4a3f34f1d7b06 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment