Skip to content

Instantly share code, notes, and snippets.

@huaweigu
Forked from nicktoumpelis/repo-rinse.sh
Created May 17, 2023 19:12
Show Gist options
  • Save huaweigu/613df0cadad1f02b10916ef1f8fd1eeb to your computer and use it in GitHub Desktop.
Save huaweigu/613df0cadad1f02b10916ef1f8fd1eeb 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
@huaweigu
Copy link
Author

git restore . --recurse-submodules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment