Skip to content

Instantly share code, notes, and snippets.

@MrSwed
Last active October 14, 2015 22:50
Show Gist options
  • Save MrSwed/fb76fde40c6c16863c87 to your computer and use it in GitHub Desktop.
Save MrSwed/fb76fde40c6c16863c87 to your computer and use it in GitHub Desktop.
#!/bin/sh
# git add -r Recursively add files by pattern
# https://gist.github.com/MrSwed/fb76fde40c6c16863c87
echo "Shorter for: find . -name \"$1\" | xargs git add ${@:2}"
mask=*
if [[ $1 ]]
then
find . -name "$1" | xargs git add ${@:2}
else
echo "
Usage $0 <*.file.*.mask.*>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment