lazygit: When commiting files lazygit exits

Describe the bug When you press enter to commit your files, lazygit prompts you to return to lazygit.

To Reproduce Steps to reproduce the behavior:

  1. Stage your files
  2. Add a commit message and commit them
  3. press enter

Expected behavior stay in lazygit’s terminal UI, until prompting lazygit to leave by pressing q

Screenshots If applicable, add screenshots to help explain your problem.

Version info: lazygit and git version

commit=, build date=, build source=nix, version=0.38.2, os=linux, arch=amd64, git version=2.40.1

Additional context I’d add a video or screenshots to show what it looks like. also I have tried uninstalling and installing it and same behavior, I’ve also tried installing it through home-manager

Platform: Linux OS: NixOS Package Repo: nixpkgs

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16

Most upvoted comments

Lazygit suspends itself to the background if you have commit.gpgsign set to true in your git config. It does this because you might have to type in a password, so we need to be in the console when that happens. @Turmaxx claimed above that this still happens when disabling the commit.gpgsign config, but honestly I don’t believe that; maybe you didn’t quit and restart lazygit when you turned off the option? Lazygit caches git configs in memory for performance, so you need to quit and restart for changes to take effect.

If you want to keep commit.gpgsign on, and you are sure that you won’t have to type a password (I’m not familiar with gpg signing, so I don’t know under what conditions that would be the case), then you can set the lazygit config git.overrideGpg to true to disable the suspending.