Git: "Error updating changes: The Git process exited with the code 1"

Good day.

I'm using PhpStorm with WSL2 + Debian 11 on Windows 11. PhpStorm is installed on my home OS. The project I'm working on and Git executable are inside WSL.

Recently I started getting an error after completing some of Git-related operations in PhpStorm.

It appears at different times and places, such as:

  1. After clicking the "Commit" button in the "Commit" menu. The dialogue on the screenshot below may appear. And I surely have my user name and email set, because I did commit changes before without any problems.
  2. After creating / checking out / updating a branch.
  3. At the bottom of "Commit" menu: "Error updating changes: The Git process exited with the code 1".
    This is the most annoying one, because to one-time fix this error I have to restart the IDE, and that's killing my productivity.

Most importantly, these errors appear randomly. There is no such an action that could be guaranteed to reproduce the error. Sometimes a Git-related operation works, sometimes it doesn't. Sometimes I have to press "Commit" button up to 4 times to overcome a dialogue. So I cannot really give any steps to reproduce the bug.

Something that I noticed while encountering these errors is that they appear more frequently towards the end of the day. Also they are more likely to appear when I start a lot of actions for the relatively short period of time (clicking buttons rapidly while being concentrated).

When I use Git from terminal, I don't get errors of that kind.

I have already updated PhpStorm to the latest version - 2022.1.3. I have also updated all the plugins.

I tried disabling non-built-in plugins one by one, but I still encounter errors. When I disable Git plugin I obviously don't have errors anymore, but hey, then what's the point? :)

What can I do to fix this error? Is this a bug in Git plugin?

3 comments
Comment actions Permalink

Hi there,

https://youtrack.jetbrains.com/issue/IDEA-276250/WSL2-The-Git-process-exited-with-the-code-1

Check comments in the aforementioned ticket. You will find an explanation and a few possible workarounds/solutions there.

It's an issue on Microsoft / WSL end.

 

2
Comment actions Permalink

Thanks for the link.

Searched this problem on the Internet for a long time with no result. Didn't believe I'm the only one. Turns out this is a rather popular bug.

0
Comment actions Permalink

Looks like this baddy is fixed with Windows 22H2 update:

https://youtrack.jetbrains.com/issue/IDEA-276250/WSL2-The-Git-process-exited-with-the-code-1#focus=Comments-27-6573749.0-0

"After applying Windows 22H2 update which was released few days ago and running wsl --update and wsl --shutdown to upgrade WSL to version 0.70.4.0 I can confirm that this issue is resolved"

Seems to have worked for me also.

0

Please sign in to leave a comment.