Created
November 4, 2021 17:38
-
-
Save carymrobbins/740066040b3fe57b01efaf6b17b56e99 to your computer and use it in GitHub Desktop.
Cleanup untracked files in your git index with fzf
This file contains hidden or 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/bash | |
while IFS= read -r -d $'\n'; do | |
rm "$REPLY" | |
done < <( | |
git ls-files --others --exclude-standard \ | |
| fzf -m \ | |
--header='Select untracked files to delete (press TAB to select multiple)' \ | |
--layout=reverse | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment