Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Forked from anonymous/git-ignore
Last active August 29, 2015 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jasonm23/3a9422f1cd18a1620d3c to your computer and use it in GitHub Desktop.
Use to quickly add patterns to .gitignore
#!/bin/sh
# Install:
#
# copy to /usr/local/bin
#
# Usage:
#
# git ignore [[pattern] [pattern] [...]]
#
# Notes:
#
# Each [pattern] specified is added to .gitignore in the current folder
#
for pattern in $@; do
echo "Adding: '${pattern}' to .gitignore"
echo "${pattern}" >> .gitignore
done
echo ".gitignore =>"
cat .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment