lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Lazygit to show only files in current directory or subdirectories

Open strogiyotec opened this issue 5 years ago • 2 comments

Good day , thank you for this amazing tool. I have a question , I have a git project with the following structure

/path/project

inside this project I have two subfolders

/path/project/folder1
/path/project/folder2

When I'm inside folder1 I want lazygit to show unstaged files only in this folder. Using terminal the command is

git status .

I tried to execute lazygit with specified folder but it still shows files from both folders

lazygit /path/project/folder1

Does lazygit support this feature ? Lazygit version is

lazygit --version
commit=, build date=2020-04-23, build source=debian, version=0.20.2, os=linux, arch=amd64

strogiyotec avatar Apr 26 '20 18:04 strogiyotec

Sorry for the late reply. I wonder if other people would want this behaviour. I like lazygit opening based on the root of the repo as opposed to whatever folder I'm in, but I can imagine that for larger repos you may want to open lazygit in the context of a subfolder. Off the top of my head I'm actually not sure how much work would be involved in doing this.

jesseduffield avatar Sep 25 '21 01:09 jesseduffield

Could we add a filter for this? Just like we have for staged/unstaged files, we could add something like show only current directory which can than be provided to the following command:

$> git -C status .

mark2185 avatar Aug 07 '22 15:08 mark2185