banner



How To Change Current Working Directory In Git Bash

Your Question is :

My default git folder is C:\Users\username.git

Simply I desire to become into c:/project

What command do I need to get into that?

Since you have asked primarily nearly gitbash which is Linux based (Terminal), at that place are differences in commands when compared with Command Prompt of Windows. We'll discuss gitbash (Final) commands only.

1.First of all we must empathize that command line(In Windows) and Final(In Mac) e'er points to some folder on storage Drives .

To check towards what directory information technology is pointing to at any given fourth dimension. Y'all demand to type the command: pwd "an acronym for 'Print Working Directory' ".

pwd command in Linux

  1. There is a command ls which gives united states data well-nigh the folders and files in a particular directory. This is quite a handy command and often used to know about the file structure. In my respond I will brand use of this also.

enter image description here

  1. To traverse along the folder tree we make utilize of yet another very important command know as cd which stands for change directory. And your question has the answer within this cd command but.

Here are some of the ways to traverse along the folder tree:

3a) cd command let's us traverse to child directory. Kindly check the snapshot. Going to child directory

3b) Now to traverse back into the parent directory, we make apply of cd .. command: Please check the Image beneath: enter image description here

By Using the above 2 steps we can easily solve your Query:

A) Currently yous are in : C:\Users\username.git

So, doing cd .. will indicate the Final towards Users folder.

enter image description here

B) Again Typing cd .. will make Terminal to point towards C Drive.

enter image description here

C) At present doing ls at this betoken will permit yous know most all the folders and files in C drive.

Bank check if there is a project folder, Then simply for the last time type the command:

cd projection

And Walla you are have traveled then far to reach to your destination. Congratulations.

enter image description here

Notation: If the project folder is non created with C drive, simply write the command mkdir project and information technology will be created. Then follow the to a higher place steps to play effectually.

4) There is i more than straight forward quick solution to your problem in particular:

Wherever the concluding is pointing. Simply write the command:

4a) cd / Information technology will point to default root binder.

Then type the command : cd /c/ to point towards c directory. Then but go to child directory, which in your case is project directory by typing:

cd project

enter image description here

And you are skillful to go: Enjoy :)

How To Change Current Working Directory In Git Bash,

Source: https://stackoverflow.com/questions/8961334/how-to-change-folder-with-git-bash

Posted by: michealswoned1969.blogspot.com

0 Response to "How To Change Current Working Directory In Git Bash"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel