Change drive in git bash for windows

别来无恙 提交于 2019-11-28 16:34:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!