Keep 1 file and ignore others in a directory
.gitignore
.gitignore
# Ignore all file in a directory
directory/*
# Keep only this file
!directory/file-to-keep.extWelcome to MikeDaDev's Blog – notes on Java, backend & system design.
ExploreKeep 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