0

I would like to exclude all files except a single directory, I have seen other solutions but none works:

!home/
home/*
!home/.bashrc

home/some_dir/*
!home/some_dir/src/

home/some_dir/src/*
!home/some_dir/src/some_other_dir/

Git can see .bashrc and .gitignore but not the some_other_dir.

Phrixus
  • 1,209
  • 2
  • 19
  • 36

1 Answers1

0

Ok I found the solution:

!home/
home/*

!home/some_dir
home/some_dir/*

!home/some_dir/src
home/some_dir/src/*

!home/some_dir/src/some_other_dir

!home/.bashrc
Phrixus
  • 1,209
  • 2
  • 19
  • 36