Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Bash can't change directory to documents folder

Tags:

git

I'm trying to following this Github tutorial: https://www.youtube.com/watch?v=73I5dRucCds When I try to change my directory to my desktop, I get this in my Git Shell:

Natha_000@idea-PC MINGW64 ~ 
$ cd /desktop
bash: cd: /desktop: No such file or directory

Natha_000@idea-PC MINGW64 ~
$ cd /Desktop
bash: cd: /Desktop: No such file or directory

Natha_000@idea-PC MINGW64 ~
$ cd Desktop
bash: cd: Desktop: No such file or directory

Natha_000@idea-PC MINGW64 ~
$ cd Documents
bash: cd: Documents: No such file or directory

Natha_000@idea-PC MINGW64 ~
$ cd /c/Desktop
bash: cd: /c/Desktop: No such file or directory

Natha_000@idea-PC MINGW64 ~
$ cd Documents
bash: cd: Documents: No such file or directory

I've tried a few different things and It doesn't seem to work. Any ideas about what I'm doing wrong? I'm guessing it's going to be a pretty stupid mistake...

like image 212
Natey17 Avatar asked Nov 10 '15 09:11

Natey17


People also ask

How do I change the directory in git bash?

To change this current working directory, you can use the "cd" command (where "cd" stands for "change directory"). For example, to move one directory upwards (into the current folder's parent folder), you can just call: $ cd ..

How do I switch to D drive 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]. Save this answer.

How do I put Documents folder into cd?

Change Directories Using the Drag-and-Drop Method If the folder you want to open in Command Prompt is on your desktop or already open in File Explorer, you can quickly change to that directory. Type cd followed by a space, drag and drop the folder into the window, and then press Enter.


1 Answers

It seems to me you are trying to understand where Documents is.

To do that open your terminal and type cd, that will change your current directory to your home folder.

Once in your home, which should look like /c/Users/YOUR-USERNAME, type ls, your Documents folder is there.

tl;dr cd /c/Users/YOUR-USERNAME/Documents.

like image 136
Alberto Zaccagni Avatar answered Nov 05 '22 12:11

Alberto Zaccagni