Skip to content

Instantly share code, notes, and snippets.

@wojpawlik
Created October 21, 2017 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wojpawlik/bdf405738b0839d389d9ef10b20e8dd0 to your computer and use it in GitHub Desktop.
Save wojpawlik/bdf405738b0839d389d9ef10b20e8dd0 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
#!/bin/bash
for i in "$@"; do
echo $i
done >> .gitignore
@SitiSchu
Copy link

SitiSchu commented Oct 24, 2017

#!/usr/bin/env bash is better :P

@wojpawlik
Copy link
Author

[alias]
	ignore = !printf '/%s\n' "$@" >> .gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment