Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Determining if a file is ignored via .gitignore
Determining if a file is ignored via .gitignore [message #1837415] Fri, 29 January 2021 15:24 Go to next message
Sam Brannen is currently offline Sam BrannenFriend
Messages: 1
Registered: January 2021
Junior Member
Is it possible to determine if a given file would be ignored by .gitignore using the JGit Java APIs?
Re: Determining if a file is ignored via .gitignore [message #1837433 is a reply to message #1837415] Fri, 29 January 2021 19:58 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1212
Registered: July 2009
Senior Member
Sure, use WorkingTreeIterator.isEntryIgnored().
Find a complete example in EGit's RepositoryUtil [1].

Previous Topic:Single Branch Fetch
Next Topic:What is the difference in the INDEX file format compared to the Git bash?
Goto Forum:

Current Time: Tue Sep 27 05:36:28 GMT 2022

Powered by FUDForum. Page generated in 0.03652 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top