Skip to content

Instantly share code, notes, and snippets.

@MKRhere
Forked from wojpawlik/git-ignore
Last active May 3, 2018 15:44
Show Gist options
  • Save MKRhere/9f56c0db45c5ce2da76d35bf72e491b9 to your computer and use it in GitHub Desktop.
Save MKRhere/9f56c0db45c5ce2da76d35bf72e491b9 to your computer and use it in GitHub Desktop.
Easily add files to .gitignore from shell. Just put it in a directory in your PATH and chmod +x git-ignore
#!/usr/bin/env bash
if [ -d "./.git" ]; then
for i in "$@"; do
echo $i
done >> .gitignore
else
echo "Not a git repository"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment