

You will know you are now in a Git repository, evidenced by the (master) label after the path name in command prompt. To get here, we need to type in the following $cd /c/users/&user-profile%/documents/git, as shown below. My new repository is located in C:\Users\%user-profile%\Documents\Git\.git. However, typing this in will bring you to the folder where Git is installed, C:\Program Files\Git, which is not what we may want. The first time I worked with Git Bash, I thought the command $ cd / would bring me back to the root folder, the C: drive. Folders with access are colored dark blue, with files having no color. The light blue folders with the symbol, are folders that the current Windows account does not have access to. You will notice that your folders are color coded. Using “ls” will list the files as shown below:īy default, as shown above Git will list the files in your C:\Users\%user-profile%. Using “dir” will list the files as shown below: “ls” is a command to list files in Unix and Unix-like operating systems.

Once open you will see the following, an empty window with a dollar sign and a flashing cursor:įrom here you can type “dir” or “ls”. Open Git Bash in your Windows Start menu. To install Git for Windows, click on this link. On Windows 7, the default directory is C:\Program Files\Git. This guide also assumes that you have installed Git in the default directory as set in the installation process. This guide assumes that you already have Git installed on your machine and covers a basic installation using Windows 7. While I have used version control tools such as GUI’s – GitHub for Windows, Tortoise SVN for several years, learning the command line can be pretty intimidating and confusing, so providing an easy to understand way to get started being comfortable changing directories on your machine is the goal of this article.

Since I am fairly new to using the command line, using tools such as npm, Node.js, and Git Bash, I figured I would describe how I figured out to change directories, when starting a new project and initializing a Git repository. This brief tutorial describes how to change directories using Git Bash for beginners.
