# System Environmental Variables being wiped on update

2 messages from 2023-03-22 to 2023-04-03. Participants: Richard Spano, Johannes Schindelin.
Thread: https://gitlist.dev/t/59437

## Richard Spano, 2023-03-22 10:34

Subject: System Environmental Variables being wiped on update
Message-ID: <AS2PR03MB919368C4FB4C7F94255D2CEA89869@AS2PR03MB9193.eurprd03.prod.outlook.com>
URL: https://gitlist.dev/e/AS2PR03MB919368C4FB4C7F94255D2CEA89869%40AS2PR03MB9193.eurprd03.prod.outlook.com

```
Hello,

I couldn’t find anything for this so we wanted to reach out.

We have GIT installed on machine and we have “C:\Program Files\Git\usr\bin\” added to the PATH system variable (windows). When updating GIT this addition to the PATH variable is wiped. If this is not noticed then we have issues with GIT until we manually re-add this in.

Is there a way to stop these variables being removed during a GIT update?


Regards, 

      Richard Spano

   
```

## Johannes Schindelin, 2023-04-03 15:10

Subject: Re: System Environmental Variables being wiped on update
Message-ID: <7aeccfbc-a6d1-8fc4-339f-562c53d1c133@gmx.de>
URL: https://gitlist.dev/e/7aeccfbc-a6d1-8fc4-339f-562c53d1c133%40gmx.de
In-Reply-To: <AS2PR03MB919368C4FB4C7F94255D2CEA89869@AS2PR03MB9193.eurprd03.prod.outlook.com>

```
Hi Richard,

On Wed, 22 Mar 2023, Richard Spano wrote:

> We have GIT installed on machine and we have “C:\Program
> Files\Git\usr\bin\” added to the PATH system variable (windows). When
> updating GIT this addition to the PATH variable is wiped. If this is not
> noticed then we have issues with GIT until we manually re-add this in.
>
> Is there a way to stop these variables being removed during a GIT update?

The Git for Windows-specific part of the `PATH` is considered to be
"owned" by Git for Windows. This is required to allow for future changes
similar to the ones when we moved Git for Windows from MSys to MSYS2,
where the paths changed that needed to be added.

However, I have good news for you: if you _want_ `usr\bin` to be added to
the `PATH`, you only need to select the 3rd option on the "Adjusting your
PATH environment" page of the installer.

You might want to review the implications, though.

Ciao,
Johannes

```
