'Git Bash, go back in folders
Im doing a course of "ECMASCRIPT 6" and in the video the teacher is using the Git Bash console. i have to go back in the folders so i can go to the folder i want (im in C, i want to go to a folder in D) but using the command "cd.." or "cd..." doesn't work.
DanielaStornelli@DESKTOP-J408UN1 MINGW64 /c/Windows/system32
$ cd..
bash: cd..: command not found
i tried right clicking in the folder i want to go and selecting "Git Bash Here" as the teacher does in the video but i don't get that option. I also opened "Git Bash" as administrator just in case, but its the same problem. This is the folder i want to go to:
D:\ES6
How can i do this?
Solution 1:[1]
if you want to go to a certain file or directory you don't need to type it, just drag the file or directory to the bash window and the path
of that file or directory will show up (in Windows, not sure about other operating systems), then just write in at the start of that path cd
(with space between the cd
and the path
) and you will enter that path
in bash
Solution 2:[2]
The problem with your code is a space between the two "CD" and the two fullstops. I retried that and it worked..
A Brief Theory:
To go back to particular directory without pasting the entire directory simply input this command: "cd"+".." That is the normal Change directory command :"cd" plus two fullstops "..". This will simply go backspace the current directory and goes back to the previous directory.
An example if you had "C://Users"
After the command you would go to "C://"
Attached below is how I used it to go back to the previous working directory.
Git Bash Example of Going back to the Previous Directory
If this also doesn't help consider searching other Gitbash commands e.g., pwd (Previous working Directory)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 |