Skip to content

Instantly share code, notes, and snippets.

@ziriax
Created August 6, 2020 13:26
Show Gist options
  • Save ziriax/110767db34f99c494803957c5cb13fd2 to your computer and use it in GitHub Desktop.
Save ziriax/110767db34f99c494803957c5cb13fd2 to your computer and use it in GitHub Desktop.
git reset hard all subfolders (not submodules)
Get-ChildItem -Recurse -Include ".git" -Hidden -Directory | %{pushd "$_\.." ; git reset --hard; popd }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment