Changing the root directory (/) of git bash

79E09796 picture 79E09796 · Aug 30, 2016 · Viewed 17.2k times · Source

Is there a way to change the root (/) directory of git bash on windows.

By default it is set to the installation folder. Setting it to c:\ instead would save needing to type the drive letter e.g. /c/some/path on all absolute paths.

Answer

agilob picture agilob · Aug 31, 2016

echo 'cd /c/' >> ~/.bashrc

Automatically go to /c/ directory when opening bash cli.