Ignore all file types under the .gitignore directory

I am trying to ignore all files of a certain type in a directory recursively. For example, if I have a folder assembly and other folders are under it, let's say:

  -Build
 \ -Folder1
 | -Folder2
 | -Folder3

How can I delete all .class files in each directory under the assembly?

thanks

+4
source share
1 answer

Make a .gitignore file in the assembly directory and put *.class in it. You can learn more about Git Ignore Files here .

If the .class files are already being monitored, you need to delete the files so that Git does not track them. git rm --cached '*.class' will cause the files to stop being tracked, but leave them on the local file system.

+5
source

All Articles