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?
Example 01: Check Current Working Directory The cd command in Git Bash allows you to move within the directories, probably from the current directory to another directory. The command “cd” means “change directory.” The cd command can be widely used in any Linux system's shells (cmd) for the same purpose.
Use rm -r switch with the git command to remove directory recursively. After removing the directory you need to commit changes to the local git repository. Then push the changes to remove the directory from the remote git repository.
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].
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 ...
Just wanted to add, make sure to insert space between cd and ..
no: cd.. yes: cd ..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With