jesseduffield / jesseduffield/lazygit

Deleting the .git folder while lazygit is open causes it to crash

Open
#3,681 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
When lazygit is open and the `.git` folder is deleted lazygit crashes.

**To Reproduce**

1. Run `git init`
2. Run `lazygit
3. Delete the `.git` folder while lazygit is running

**Expected behavior**
That lazygit exists cleanly with an error message, For example: ".git folder was deleted, exiting..."

**Screenshots**
![image](https://github.com/jesseduffield/lazygit/assets/58148984/3a5c8d76-8941-4091-ab69-1e631691fcb3)

**Version info:**
commit=, build date=, build source=nix, version=0.40.2, os=darwin, arch=arm64, git version=2.43.0
git version 2.43.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.