简体   繁体   中英

How do I make git stop tracking files with the same extension?

I want git to stop tracking the.class files of my folder, I don't really need them to be tracked, I know I can put their names on.gitignore but is there a way to just ignore any future, past and present things that has the.class extension?

Yes there is! Just add this (on a separate line) to your .gitignore :

*.class

The * serves as a wildcard to match any string (so it could be any file name)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM