Last active
May 28, 2017 06:26
-
-
Save coord-e/431a8f00a2c909d5b3c5a4a7434981f7 to your computer and use it in GitHub Desktop.
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
git-add-untracked () { | |
FILES=$(git ls-files --others --exclude-standard $1) | |
echo $FILES | sed '/^$/d' | |
echo "Adding $(echo ${FILES:+$FILES" "} | grep -o " " | grep -c ^ | sed '/^$/d') files" | |
echo $FILES | xargs git add | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment