Skip to content

Instantly share code, notes, and snippets.

@CEOehis
Forked from chichunchen/.gitignore
Created November 11, 2018 19:46
Show Gist options
  • Save CEOehis/98f1425f3619a5f7839b9f02fa9bf2a8 to your computer and use it in GitHub Desktop.
Save CEOehis/98f1425f3619a5f7839b9f02fa9bf2a8 to your computer and use it in GitHub Desktop.
Git ignore binary files
# Ignore all
*
# Unignore all with extensions
!*.*
# Unignore all dirs
!*/
### Above combination will ignore all files without extension ###
# Ignore files with extension `.class` & `.sm`
*.class
*.sm
# Ignore `bin` dir
bin/
# or
*/bin/*
# Unignore all `.jar` in `bin` dir
!*/bin/*.jar
# Ignore all `library.jar` in `bin` dir
*/bin/library.jar
# Ignore a file with extension
relative/path/to/dir/filename.extension
# Ignore a file without extension
relative/path/to/dir/anotherfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment