jesseduffield / jesseduffield/lazygit

Lazygit broke when trying to merge with .gitignored files

Open
#2,926 0 comments 1 reaction 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**
For context, In my dotfiles, I added `*` wildcard in my .gitignore, as I am lazy to ignore specific files that I don't need, and don't really have time to, so I am fine whenever I wanted to commit some files and it shows the error that particular file is in my .gitignore, and I just escape it. But it broke whenever I try to fix some merge conflict in that .gitignored files.

I do not really mind fixing my .gitignore, but I wanted to report this if this is really consider a bug, and I believe it is.

**To Reproduce**
1. For easy reproducibility, Add `*` in your .gitignore
2. Commit a file that git consider the file gitignored
3. Create a merge conflict
4. Try to fix this with lazygit

**Expected behavior**
Should be successfully fix the merge conflict.

**Screenshots**
![image](https://github.com/jesseduffield/lazygit/assets/51053482/786668f9-c820-4b73-9830-5791ea6939be)

Much better visualization.
[Video.webm](https://github.com/jesseduffield/lazygit/assets/51053482/4baed83c-df1f-4f04-bf5a-7e04ad924036)
![Animation](https://github.com/jesseduffield/lazygit/assets/51053482/c2692a9a-2bf7-4764-9b2f-7e603fd11987)

Take note, that I cannot escape it or close the program. So I just proceed with just closing the session/terminal.

**Version info:**
_Run `lazygit --version` and paste the result here_
`commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=windows, arch=amd64, git version=2.38.1.windows.1`

_Run `git --version` and paste the result here_
`git version 2.38.1.windows.1`

**Additional context**
I am using windows 11 and wezterm terminal

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.