11

How do I change my git home folder? Currently my git folder is located in my %AppData% folder. I store my projects in my C:\Projects folder. I would like my git bash to start up in my C:\Projects folder and whenever I cd to my home directory (cd ~) I want it to navigate to C:\Projects.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Tommy Saechao
  • 1,099
  • 4
  • 17
  • 28

1 Answers1

34

Maybe this is what you want:

cd /c/projects

EDIT:
if you want it to start up within this directory, then just do this in cmd(admin):

setx HOME "C:\Projects"

after this you need to restart git-bash.
To test variable enter this in git-bash:

echo $HOME
BladeMight
  • 2,670
  • 2
  • 21
  • 35
  • Tested `cd ~`, and it has navigated to C:\Projects as expected. – BladeMight Jul 11 '16 at 22:44
  • It worked well and it did exactly what is in the question. In my case it also changed the "options" setting, i.e. color, fonts, window size, etc., to a default setting, which wasn't really difficult to change again. – Reza Dodge Mar 10 '18 at 21:20