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

Mihir picture Mihir · Aug 17, 2013 · Viewed 64.7k times · Source

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

Answer

Stefan Näwe picture Stefan Näwe · Aug 17, 2013
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.