Get out of a folder using Git Bash

90,053

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 type cd .. it will leads to go to previous directory.Most probably people will type like this cd ..users/username so don't do that mistake; just type cd .. .

Other mistakes: don't type :- cd.. do :- cd ..

give space between cd and dots.

Share:
90,053
vin
Author by

vin

Updated on August 09, 2021

Comments

  • vin
    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 the C:\user\myUsername folder.

    What commands do I write in Git Bash?

  • Kenny Evitt
    Kenny Evitt almost 11 years
    It's interesting that the drives in Windows are top-level (bottom-level?) directories in the Bash shell.
  • Ray
    Ray over 6 years
    I'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.