Get out of a folder using Git Bash
Solution 1
To change your directory in git-bash to that specific path you can use this command :
cd /c/user/myUsername
basically you have to replace backslash with standard slash, or otherwise if you simply want to go to the parent directory you can use :
cd ..
as stated in comments that you already received on your question ...
Solution 2
Just wanted to add, make sure to insert space between cd and ..
no: cd..
yes: cd ..
Solution 3
If you want to move one directory up, just type command cd ..
if you are following any tutorials most probably they will use macOS so that means they will use there own linux commands like
cd/home/your username
.So just click typecd ..
it will leads to go to previous directory.Most probably people will type like thiscd ..users/username
so don't do that mistake; just typecd ..
.
Other mistakes:
don't type :- cd..
do :- cd ..
give space between cd and dots.
vin
Updated on August 09, 2021Comments
-
vin almost 3 years
I am using Git Bash and am trying a few things like making a 'commit' and 'push' to GitHub. I want to get out of the current directory
C:\user\myUsername\app
and land in theC:\user\myUsername
folder.What commands do I write in Git Bash?
-
Kenny Evitt almost 11 yearsIt's interesting that the drives in Windows are top-level (bottom-level?) directories in the Bash shell.
-
Ray over 6 yearsI'm using Windows 10 and in Git Bash, the command "cd .." does not work. It does not move me one directory upwards. Space or no space.