Git Bash: Change Default Directory

By default the startup directory where you appear when you launch Git Bash is /, that is the installation folder of Git Bash.

If you need to find out the path to /, you can run this command:

$ explorer .

It opens the current directory in the File Explorer so you will see the path in the address bar.

Cool Tip: How to change a Home (~) directory in Git Bash! Read More →

Change Default Directory in Git Bash

To change the default startup directory of Git Bash, do the following steps:

  1. Right-click on Git Bash’s shortcut icon and go to the Properties
  2. In the Start in field, paste the path to the desired folder, e.g. D:\WorkDir
  3. Remove --cd-to-home from the Target field if it exists

Cool Tip: How to clear a commands history in Git Bash! Read More →

Was it useful? Share this post with the world!

4 Replies to “Git Bash: Change Default Directory”

  1. Perfect! Thanks so much!

  2. Thanks a ton..!! Solved a related issue that had been eating my time a lot.

  3. Thanks a lot! I was missing the last step. It works now!

  4. Thanks, solved it for me.

Leave a Reply