问题
I was trying to navigate to my drive location E:/Study/Codes
in git bash
in windows. In command prompt in order to change drive I use E:
It returns an error in git bash
.
bash: E:: command not found.
How do I change my current directory location from /c/users
to E:Study/Codes
回答1:
In order to navigate to a different drive just use
cd /E/Study/Codes
It will solve your problem.
回答2:
Just consider your drive as a folder so do cd e:
回答3:
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].
回答4:
How I do it in Windows 10
Go to your folder directory you want to open in git bash like so
After you have reached the folder simply type git bash
in the top navigation area like so and hit enter.
A git bash for the destined folder will open for you.
Hope that helps.
来源:https://stackoverflow.com/questions/38563826/change-drive-in-git-bash-for-windows