Seeing the ignored files list / "unignore" #5840
|
Hi, first things first - huge thank you for this awesome tool! Sorry if I missed that in the docs, but, is there a view in the Lazygit that allows user to view the list of ignored files? Quickly scanning the keybindings in Files and Branches views, I only saw the way to add files to the ignore/exclude lists. But how can one "undo" that - view and edit the ignored items list? For example, if I added some file not to the Maybe there's even a way to figure out where some particular ignore items are coming from - |
Replies: 1 comment 2 replies
|
You didn't miss it — there isn't one. The files panel only has The good news is git answers both of your questions in one command. You get output like: so the If you want it a keypress away, lazygit's custom commands can bind it: customCommands:
- key: "<c-i>"
context: "files"
description: "show ignore source for file"
command: "git check-ignore -v --no-index {{.SelectedFile.Name}}"
showOutput: trueUndoing still means editing Given the tool has an "ignore" action with no matching "unignore", this seems like a reasonable feature request if you want to open one. |
You didn't miss it — there isn't one. The files panel only has
i(Ignore or exclude file), and there's no view that lists ignored entries or lets you remove them. lazygit doesn't callgit check-ignoreanywhere in its codebase, so it has no notion of tracing where a rule came from either.The good news is git answers both of your questions in one command.
check-ignore -vprints the source file and line number for every match, and you can feed it the full ignored list:You get output like:
so the
.git/info/excludeentries you were …