You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow opening a bare repo without any worktrees defined. #4330
Right now if you use bare repos with git worktree, lazygit is a bit more annoying to use that it should be.
If I clone down a bare repo and open lazygit in it, it fails with
Error: must be run inside a git repository
What would be ideal would be for lazygit to recognize it's a bare repo and go ahead and open.
Then you could use the w command to create new worktrees from the branches.
This would lead to a much smoother workflow for those using bare repos with worktrees.
Duplicate of #4244. However, over there we didn't consider the use case of opening a bare repo in order to create a worktrees from within lazygit. Not sure if this changes the picture. It's still a lot of work, and I'm unsure it's justified for this little convenience.
After discovering the power of worktrees, it became part of my workflow to download git repos in ~/git and maintain them from there, while doing actual development for them in worktrees in ~/projects.
Usually I keep the main repo just checked out at main, but for some repos I need main checked out somewhere else. That's when I use bare repos in ~/git and that's where LazyGit refuses to open them and I scream at it: It's right there you moron! >:3
Regardless, I've noticed that this seemingly is a non-trivial task. Therefore, I respect your judgment, if you say, this is not worth the effort for just a few people requesting it.
However, I would very, very much appreciate, if this was made possible. 🫶
Activity
stefanhaller commentedon Feb 26, 2025
Duplicate of #4244. However, over there we didn't consider the use case of opening a bare repo in order to create a worktrees from within lazygit. Not sure if this changes the picture. It's still a lot of work, and I'm unsure it's justified for this little convenience.
KeeWolf commentedon Sep 25, 2025
I'm having pretty much the exact same problem.
After discovering the power of worktrees, it became part of my workflow to download git repos in
~/gitand maintain them from there, while doing actual development for them in worktrees in~/projects.Usually I keep the main repo just checked out at
main, but for some repos I needmainchecked out somewhere else. That's when I use bare repos in~/gitand that's where LazyGit refuses to open them and I scream at it: It's right there you moron! >:3Regardless, I've noticed that this seemingly is a non-trivial task. Therefore, I respect your judgment, if you say, this is not worth the effort for just a few people requesting it.
However, I would very, very much appreciate, if this was made possible. 🫶
markalanevans commentedon Mar 26, 2026
So the current workaround is to add at least one warp tier. And then run lazygit from the work tree directory, not from the bare repo directory. ?