Skip to content

Instantly share code, notes, and snippets.

@RandallFlagg
Forked from nicktoumpelis/repo-rinse.sh
Created November 3, 2023 02:21
Show Gist options
  • Save RandallFlagg/3f02169e9ad5dbefecef6303a209d8f3 to your computer and use it in GitHub Desktop.
Save RandallFlagg/3f02169e9ad5dbefecef6303a209d8f3 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