Set Home Directory for msysGit

I have been using git (msysgit on windows) a lot lately.  One thing that really bothered me was that I couldn’t find a way to set the home directory.   I wanted the Git Bash to open pointed to the directory C:\Solutions, this is where all of my source code resides.  I am not sure if there isn’t a way to specify it or I just didn’t find it.  I did however come up with a way that I can get it to open to the directory of my choice. 

image

In Windows 7 do a search for git, right click and select properties.

image

Change the value of Start in to point to the directory you want Git Bash to start in.  Click OK to close and save the information.

image

Launch Git Bash, here I am using Executor (http://executor.dk).

image

Git Bash will open at the path you specified in the Start in. 

This did not change the home path, all .gitconfig, .bashrc, etc files are still located at ~.  This just caused Git Bash to open pointed to the directory of your choice.

Oh, and another thing, if you re-install or upgrade msysgit you will have to reset the value to point to your directory.  The installer overwrites the shortcut.

blog comments powered by Disqus

Calendar

<<  October 2017  >>
MonTueWedThuFriSatSun
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar

Month List