How do I change the default location for Git Bash on Windows? How do I change the default location for Git Bash on Windows? git git

How do I change the default location for Git Bash on Windows?


After installing msysgit I have the Git Bash here option in the context menu in Windows Explorer. So I just simply navigate to the directory and then open Bash right there.

I also copied the default Git Bash shortcut to the desktop and edited its Start in property to point to my project directory. It works flawlessly.

Windows 7x64, msysgit.


The easiest way without installing msysgit is right click on the Git Bash shortcut icon → Start in: → "C:\Program Files (x86)".

Change the Start in entry and point out the Git Bash starting position. If you don't remove the --cd-to-home part from the Target box, the Start in change gets overridden.


Add this line to your .bashrc file:

cd C:/xampp/htdocs/<name of your project>;

If the .bashrc file doesn't exist, create one in your root folder. For me it is: C:\Users\tapas\

Save .bashrc and open Git Bash. That's it!