Last active
October 19, 2022 13:07
-
-
Save aaronpowell/9732002 to your computer and use it in GitHub Desktop.
Resetting multiple files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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