How would I change to the directory C:/Users/myname/project name
in Git Bash?
In order to navigate to a different drive/directory you can do it in convenient way (instead of typing cd /e/Study/Codes), just type in cd[Space], and drag-and-drop your directory Codes with your mouse to git bash, hit [Enter].
Using Windows Explorer, navigate to any directory you want, type "cmd" in the address bar it will open Windows command prompt in that directory. Along the same lines, if you have the git directory in your path, you can type "git-bash" in the address bar and a Git Shell will open in that directory.
cd /c/users/myname/project\ name
Beware that ls /
, or typing cd /
followed by Tab-completion, might not show the existence of this folder, but cd /c
will still work. Also note that pwd
(to print the current working directory) might show something like /bin
, but this might not be the actual working folder for commands such as git clone
, which might use the folder from which Git Bash was started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With