From 3319f6b642ead24e71bf0c9573e8590c1b13e6f4 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 11 Jun 2017 09:00:22 -0600 Subject: [PATCH] Add git-nuke-untracked files. Quick way to tidy your repository --- bin/git-nuke-untracked-files | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/git-nuke-untracked-files diff --git a/bin/git-nuke-untracked-files b/bin/git-nuke-untracked-files new file mode 100755 index 000000000..4512485bc --- /dev/null +++ b/bin/git-nuke-untracked-files @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# +# Delete untracked files from a git clone tree +# +# Copyright 2017, Joe Block + +set -o pipefail + +git status -su | cut -d' ' -f2- | tr '\n' '\0' | xargs -0 rm