Set Git Bash default path

How to change the default directory for Git Bash

Git for Windows includes a tool called Git Bash, which gives you a bash shell you can use to run git via the command line.

To set the Git Bash default directory, change the Start in field on the Shortcut tab of the Git Bash properties.

Here’s how:

  1. Right-click the Git Bash icon in the taskbar to display the taskbar shortcut menu.

  2. Right-click the Git Bash command in the taskbar shortcut menu and then select Properties.

  3. If the Target field includes the -cd-to-home option, remove it.

  4. Set Start in to the directory you wish to use.

    Use the Windows cmd path naming convention, instead of Unix.

    For example: c:\mypath\myrepos instead of /c/mypath/myrepos.

  5. When finished, select OK or press Enter.

If necessary, exit and restart Git Bash.

Vital statistics

  • 7 May 2024: Rewritten and updated for site revamp
  • 2 June 2018: First post