[git] How to change folder with git bash?

How to change folders in Git Bash

As Bob mentioned, you can change directories with cd:

cd /c/project

If you have a Windows path with backslashes, enclose the path in double quotes:

cd "C:\project"

Tips

  • You can check the current folder with pwd.

  • If the path contains spaces, you will need to use quotation marks. (cd "C:/Program Files")

  • On Windows, you change the default starting directory for Git Bash.

    • Right click git-bash.exe, select Properties, open Shortcuts, and change Start in: to your most commonly used folder. (screenshot)
  • The cd command can be memorized as "change directory".

See also