I have a fresh git init --shared
which results in:
.git
/dir1
/dir2
.gitignore
I want to track everything inside of dir1
and only .conf
files inside of dir2
.
So far I have this in my gitignore but it's not working as expected; dir2
remains totally untracked.
# Track the root
!/
# Omit every item under the root
/*
# Track dir1 under the root
!/dir1/
# Track .conf files anywhere
!*.conf
# Track .gitignore under the root
!.gitignore
Output of git status
:
.gitignore
dir1/