Just add the following line to your .gitignore file (the file should be located in the root of the git repo):
Excludes all directories named include. Suppose I’m in /home/droidzone/kernel and there are subdirectories like the following:
/home/droidzone/kernel/include /home/droidzone/kernel/arch/arm/include /home/droidzone/kernel/exynos/include
The above rule will stop git from tracking all these directories.
In most cases the directory had already been tracked by the time you added the gitignore rule. In such an instance you can remove all these tracked directories from the git with the following:
git rm --cached -r include/
To be effective it should be combined with a .gitignore rule.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.