Here are the steps I followed:
In bash, check in which directory you are by using the command:
$ pwd
copy the URL of the directory you want to go like after using the first command (PWD
) I got:
$ /c/Users/yourUsername
Now I want to change this to the directory of c
drive and folder MyPictures
. To do that, I will go the directory of MyPictures
, copy the URL,
and paste it in the Git bash. However, before that:
C:\MyPicture
becomes $ cd /C/MyPicture
(backslashes are replaced with slashes)
if the folder name is having some spaces like (my program) then you need to enclose it in double quotes like:
$ cd "C:\Program Files"
Remember to change directory you just need to copy the requiredUrl
and paste that in bash with double-quotes like:
cd "required URL"
Note: URL required with slashes.