From 3a3b32b5a2b961c5893117ce13a8e20c7f64c5cc Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 28 Dec 2022 23:45:13 +0000 Subject: [PATCH] docs(daily-email): add 2022-12-28 --- website/src/daily-emails/2022-12-28.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 website/src/daily-emails/2022-12-28.mdx diff --git a/website/src/daily-emails/2022-12-28.mdx b/website/src/daily-emails/2022-12-28.mdx new file mode 100644 index 000000000..5f08cd7cf --- /dev/null +++ b/website/src/daily-emails/2022-12-28.mdx @@ -0,0 +1,19 @@ +--- +title: > + Debugging gitignore rules +pubDate: 2022-12-28 +permalink: > + archive/2022/12/28/debugging-gitignore-rules +tags: + - git +--- + +Have you wondered why a file or directory is being ignored in your Git repository and isn't appearing when you run `git status`? + +Maybe you have multiple `.gitignore` files and you don't know which is causing the issue, or you ignore everything and explicitly unignore the files that you want to add. + +## `check-ignore` to the rescue + +`git check-ignore` accepts a list of paths and checks if each is ignored. + +There's also a `--verbose` option that will tell you which `.gitignore` file is causing it to be ignored as well as the line number and the pattern - great information for debugging, and no more force adding files.