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

<<  December 2017  >>
MonTueWedThuFriSatSun
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Month List