Questions

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

0

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 2 years, 1 month ago
Reputation: 1





1 Answer

0

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

**/.classpath

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

**/target/

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

answered 2 years, 1 month ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  2 years, 1 month ago
Viewed:  691 times
Active:  2 years, 1 month ago