Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Last active October 19, 2022 13:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpowell/9732002 to your computer and use it in GitHub Desktop.
Save aaronpowell/9732002 to your computer and use it in GitHub Desktop.
Resetting multiple files
#!/bin/sh
# Change the regex in `egrep` to match the pattern you want to reset
git status -s | grep "^A" | sed 's/A //' | while read i; do git reset HEAD $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment