I have a folder with lots of subfolders that contain lots of different file types. I want particular file types to be added to git repository. And I don’t want to add any other file types. I’ looking for solutions that will work for every folder structure.
Thus I’m trying to exclude all the files containing in the folder structure except of particular patterns. The problem is, as I understand, git doesn’t look into ignored folders.
For instance, let's say I want to place to git *.docx and ignore the rest of files. Could anybody say what .gitignore should be in this case?