How to ignore certain files or folders present inside any directory in .gitignore?


I have a git repository I want to ignore some files like .classpath or .project that may be presnet inside many directory.
How to do that?

asked 1 year, 10 months ago
Reputation: 1

1 Answer


To ignore a file like .classpath inside any directory just put below line in .gitignore file.


You can do the same thing with folders/directories also. To ignore target/ directory inside multiple folders


You just need to prefix file/folder with **/

answered 1 year, 10 months ago
Reputation: 1

Your Answer

Nothing to preview

Post Answer

Asked:  1 year, 10 months ago
Viewed:  580 times
Active:  1 year, 10 months ago