Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Reaching to a directory in git-bash
I have created a directory named Temporary_add_to_version_control
on Desktop
. Now I am trying to reach that directory by typing the following in git-bash:
cd ~/Desktop/Temporary_add_to_version_control/
I am getting the error message:
bash: cd: /c/Users/username/Desktop/Temporary_add_to_version_control/: No such file or directory
Why am I getting this error message? How do I get to my directory?
1 answer
You can narrow down the problem by using cd
to navigate to the different nested directories in the path one at a time, starting from the one on the left. The first one that gives you an error tells you that this is the directory causing the problem.
In this particular case, you could try the following in this order:
cd ~
cd ~/Desktop
cd ~/Desktop/Temporary_add_to_version_control
Once you have identified which directory is causing the problem, you can edit the question to add more detail, or post a self answer to the question if narrowing down helped you solve the problem yourself.
3 comment threads