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 1 year, 8 months 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 1 year, 8 months ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  1 year, 8 months ago
Viewed:  494 times
Active:  1 year, 8 months ago