Is your feature request related to a problem? Please describe.
Beeing able to run git from any folder by providing the wanted git directory with an argument.
Describe the solution you'd like
Something like
lazygit --git-dir=/path/to/git/dir/
(analogue to the official git api)
Or something more convenient like
```bash
lazygit -p (--path) /path/to/git/dir
What about just lazygit /dir/to/some/git/repo
Most programs work like that, for example vscode:
code opens vscodecode /path/to/dir opens vscode in a specific dir/fileI'd also go for what @mjarkk suggests.
Agree
Ill have a quick check on how to implement this
@MishaFrenkman @mjarkk PR is up following the standard lazygit /path/to/dir.
thanks @glvr182 for tackling this issue :)
@MishaFrenkman just to get clarification on your use case, there is a feature for opening recent repos, by going to the status panel (the top left one) and hitting 's'. Is your use case not satisfied by that feature?
@jesseduffield true, but I cannot start lazygit without being inside a git folder tho
@MishaFrenkman do you think it would be helpful to have lazygit let the user choose from a list of recent repos if you're opening lazygit it outside a git folder?
@jesseduffield yes, that's a good idea indeed
or like git cmd:
git log -- . # show log for current dir
so , we can use it like :
lazygit .
@houfeng0923 I think what you are trying to say is already said in the second comment,
But correct me if i'm wrong.
You can now run lazygit /path/to/repo/dir. PR implementing this was just merged to master.
I see there is a discussion about recent repos listed after starting lazygit in not git directory, but this issue originally was about... (see title). Thus I'm closing it as it is resolved. Feel free to create a new issue.
@mjarkk sorry for later answer.
git log -- . # show log for current dir
馃憜is not same as @mjarkk said .
the path is not a root path for git repo , but a subpath for repo .
because , in a monorepo , i just want to see the logs about one package.
i am not sure whether lazygit support or not . if it can , please give me same message .
thank u .
Most helpful comment
@MishaFrenkman @mjarkk PR is up following the standard
lazygit /path/to/dir.