Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the directory in Git Bash with Git for Windows?

Tags:

How would I change to the directory C:/Users/myname/project name in Git Bash?

like image 451
Mihir Avatar asked Aug 17 '13 12:08

Mihir


People also ask

How do I change a directory from C to D 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].

How do I open a git bash folder in Windows?

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.


1 Answers

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.

like image 99
Stefan Näwe Avatar answered Sep 18 '22 18:09

Stefan Näwe