Skip to content

Instantly share code, notes, and snippets.

@Ujang360
Created February 20, 2020 12:16
Show Gist options
  • Save Ujang360/e8ada842126edc9f50455a42efc99ea9 to your computer and use it in GitHub Desktop.
Save Ujang360/e8ada842126edc9f50455a42efc99ea9 to your computer and use it in GitHub Desktop.
Restore repo and its submodules state into clean-current-head with `git clean-recursively`
#!/usr/bin/env bash
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