Skip to content

Instantly share code, notes, and snippets.

@abhijitmamarde
Created September 19, 2018 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhijitmamarde/020b6cd31372b44d8a1f26277d36dbd1 to your computer and use it in GitHub Desktop.
Save abhijitmamarde/020b6cd31372b44d8a1f26277d36dbd1 to your computer and use it in GitHub Desktop.
add all current untracked files to git ignore
$ git status -s
?? bmp.log
?? log.html
?? output.xml
?? report.html
$ git ls-files --others --exclude-standard
bmp.log
log.html
output.xml
report.html
$ git ls-files -o --exclude-standard
bmp.log
log.html
output.xml
report.html
$ git ls-files -o --exclude-standard >> .gitignore
$ git status -s
M .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment