Keep 1 file and ignore others in a directory
.gitignore
# Ignore all file in a directory
directory/*
# Keep only this file
!directory/file-to-keep.ext
react to this snippet
~/leohuynh.dev/gists/gitignore-ignore-directory-keep-1-file
Keep 1 file and ignore others in a directory
.gitignore
# Ignore all file in a directory
directory/*
# Keep only this file
!directory/file-to-keep.ext
react to this snippet