13

I'm using Git for Windows on Windows 7.

When I adjust the PATH environment variable, the changes are not applied immediately for console windows.

In order to force applying the changes for a conventional console window, it's necessary to close and reopen the console.

But this doesn't work for Git Bash console window. Changes to PATH are applied in Git Bash only after reboot.

Questions:

  1. Why
  2. How do I force applying the changes in PATH for Git Bash without rebooting? Is there some command that can do this?
3
  • 2
    Restarting Git Bash works for me. $ git --version => git version 1.8.0.msysgit.0
    – gronostaj
    Nov 7, 2013 at 18:51
  • 2
    Confirmed, restarting git bash works for me too
    – Forza
    Nov 7, 2013 at 21:25
  • 1
    Any way to do this without restarting the git bash session? I have this problem but can't restart the git bash session, because it's running in a CI environment. Mar 6, 2020 at 3:00

1 Answer 1

10

Okay, my problem was that i was starting Git Bash from a file manager's context menu. Without being restarted, the file manager remembered the obsolete PATH and somehow transferred it to Git Bash.

Thanks to @gronostaj and @Forza for testing this issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .