I want to completely ignore a part of a git repository. The directory is currently tracked in the repository and I\'d like to ensure that
You can try with following line at beginning of .gitignore file :
!.gitignore
I think this should force git to ignore listed firs/files. I don't know is it best way, but it works in my case. e.g.
!.gitignore
my_dir/
some_dir/
Note: Of course you should git add and commit .gitignore than push to origin.