Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change git shell's start directory in windows 7

I downloaded and installed the programs offered by GitHub including Git Shell.

The problem is that I want to set up the home directory of the Git Shell program to a custom one, but I don't know how to do that.

I tried changing the "start in" field from the properties menu of the Git Shell shortcut but it didn't work.

Can anybody please give me some information on how to change the home directory of the Git Shell to a custom one?

like image 752
user2565010 Avatar asked Sep 10 '13 19:09

user2565010


People also ask

How do I change the default directory in git?

Change Default Directory in Git BashRight-click on Git Bash's shortcut icon and go to the Properties. In the Start in field, paste the path to the desired folder, e.g. D:\WorkDir.

How do I change my home drive in git bash?

Quick'n'dirty solution. Save it, open Git Bash and execute cd ~ . You should be in a directory /c/my/custom/home now. Everything that accesses the user's profile should go into this directory instead of your Windows' profile on a network drive.


1 Answers

  1. Right click on Git Shell
  2. Choose Properties
  3. Move to the end of the Target field
  4. Change --open-shell to --open-shell=c:\your_dir
like image 98
Honest Abe Avatar answered Sep 23 '22 21:09

Honest Abe