Asked by: Florentino Plechschmidt
asked in category: General Last Updated: 27th June, 2020

How do I switch drives in Git bash?

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].

Click to see full answer.


Similarly one may ask, how do I move to C drive in Git bash?

How to change folders in Git Bash

  1. You can check the current folder with pwd .
  2. If the path contains spaces, you will need to use quotation marks. ( cd "/c/Program Files" )
  3. On Windows, you change the default starting directory for Git Bash.
  4. The cd command can be memorized as "change directory".

Secondly, how do I navigate in bash? Navigating the Current Line

  1. Ctrl+a or the Home key go to the beginning of the line, and Ctrl+e or the End key go to the end.
  2. Alt+b moves back one word, and Alt+f moves forward one word.
  3. Ctrl+l or typing the clear command clears the screen.

Accordingly, how do I change drives in command prompt?

To access another drive, type the drive's letter, followed by ":". For instance, if you wanted to change the drive from "C:" to "D:", you should type "d:" and then press Enter on your keyboard. To change the drive and the directory at the same time, use the cd command, followed by the "/d" switch.

How do I initialize Git?

A new repo from an existing project

  1. Go into the directory containing the project.
  2. Type git init .
  3. Type git add to add all of the relevant files.
  4. You'll probably want to create a . gitignore file right away, to indicate all of the files you don't want to track. Use git add . gitignore , too.
  5. Type git commit .

39 Related Question Answers Found

How do I start git bash?

What is git bash?

How do I move files in git bash?


Where is git installed?

How do I use Git?

What is my current working directory git bash?


What is CD in git?

How do I list drives in command prompt?

What command do you use to delete a file?


How do I change C drive to E drive in command prompt?

How do I list directories in DOS?

How do I copy files from one drive to another using command prompt?