From 95395b9db30b0a9aee82e6bdc8f53b35e6f9b28f Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 20 Sep 2025 19:12:27 +0200 Subject: [PATCH 1/3] Document .gitignore impact on unlinked files search --- en/collect/findunlinkedfiles.md | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/en/collect/findunlinkedfiles.md b/en/collect/findunlinkedfiles.md index 87fb80384..1ca430b6b 100644 --- a/en/collect/findunlinkedfiles.md +++ b/en/collect/findunlinkedfiles.md @@ -65,6 +65,54 @@ This information is partially outdated. Please help to improve it ([how to edit The imported entries may need some editing because all the information gathered from the PDF files may not be accurate (see below "PDFs for which it works"). {% endhint %} +# How .gitignore affects “Find unlinked local files” + +JabRef’s “Find unlinked local files” feature respects `.gitignore` files. +A `.gitignore` file is a small text file where you list file names or patterns you don’t want to see; tools that support it (like Git and JabRef) skip those files during searches. + +## What JabRef does + +- Looks for an applicable `.gitignore` in the directory being scanned and applies its patterns. +- Interprets patterns relative to the directory that contains the `.gitignore`. +- Applies all patterns (not “first match wins”). +- Also ignores the `.git` directory and common OS metadata by default, and ignores the `.gitignore` file itself. + +## Notes about pattern behavior + +- Patterns are matched against the path relative to the `.gitignore`’s directory. +- Patterns like `ignore/*` and `ignore/**` work as in Git to ignore a named subdirectory and its contents. +- Patterns starting with `**/` (for example, `**/*.png`) also match files in the top directory for convenience, so PNGs are ignored both in subdirectories and at the base level. + +## Examples + +Ignore all PNG images everywhere: + +```gitignore +*.png +``` + +Ignore a specific subdirectory named ignore (and everything inside, including nested folders): + +```gitignore +ignore/* +ignore/** +``` + +Ignore PDFs in any subfolder (and also at the base directory): + +```gitignore +**/*.pdf +``` + +## Tips + +- Place a `.gitignore` file in the folder you start the search in (or deeper) to control what is scanned. +- If you use multiple `.gitignore` files in different subfolders, each one applies to the files under its directory. + +This behavior mirrors Git’s expectations in practice, while making it straightforward to exclude unneeded files from the unlinked-files search. + + + ## Further information ### PDFs for which it works From 0fc6a5c06054a1438897bdf094f44143259b74b3 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 20 Sep 2025 19:13:34 +0200 Subject: [PATCH 2/3] Change header level for .gitignore section --- en/collect/findunlinkedfiles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/collect/findunlinkedfiles.md b/en/collect/findunlinkedfiles.md index 1ca430b6b..5c4d64bf0 100644 --- a/en/collect/findunlinkedfiles.md +++ b/en/collect/findunlinkedfiles.md @@ -65,7 +65,7 @@ This information is partially outdated. Please help to improve it ([how to edit The imported entries may need some editing because all the information gathered from the PDF files may not be accurate (see below "PDFs for which it works"). {% endhint %} -# How .gitignore affects “Find unlinked local files” +## How .gitignore affects “Find unlinked local files” JabRef’s “Find unlinked local files” feature respects `.gitignore` files. A `.gitignore` file is a small text file where you list file names or patterns you don’t want to see; tools that support it (like Git and JabRef) skip those files during searches. From 71de87a0d54e8e8742eeff0b43b0744a61ebdb68 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 20 Sep 2025 19:14:32 +0200 Subject: [PATCH 3/3] Fix formatting in findunlinkedfiles.md --- en/collect/findunlinkedfiles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/collect/findunlinkedfiles.md b/en/collect/findunlinkedfiles.md index 5c4d64bf0..69f378b6d 100644 --- a/en/collect/findunlinkedfiles.md +++ b/en/collect/findunlinkedfiles.md @@ -67,7 +67,7 @@ The imported entries may need some editing because all the information gathered ## How .gitignore affects “Find unlinked local files” -JabRef’s “Find unlinked local files” feature respects `.gitignore` files. +JabRef’s “Find unlinked local files” feature respects `.gitignore` files. A `.gitignore` file is a small text file where you list file names or patterns you don’t want to see; tools that support it (like Git and JabRef) skip those files during searches. ## What JabRef does