Installing and using Git
So you want to install Git and learn how to use it, eyyy? Well, you are absolutely in the right place.
- Open a web browser and search for “Git.”
2. Search for “Downloads-Git” and click it to open up the Download section of Git.
3. Choose the type of operating system you wish to download.
4. Once downloaded, open it by clicking the file.
5. Begin the installation process and follow the prompt. In most cases, all panels are set as default. Choose a directory and hit next until you reach the end. In this case, my installation drive is “X.” A preference of mine. If you install all your programs in the “C” drive, then leave it be!
Congratulations, you have installed Git Bash!
How to use Git Bash
Using Git Bash may seem rather strange and intimidating at first! Don’t fret, it is simpler than you think.
- Open Git Bash by clicking on Start (Windows 10) and navigating above to Recently added. Click on Git Bash.
2. Git Bash opens in a terminal-like window.
The windowpane displays the directory you are currently in.
In this case, at:
To get into a different directory, we have to use command lines. So the first thing we want to do is to list out the directories to change into.
The list command is:
3. Type in the list command in your GitBash.
This displays everything that makes up your user folder.
The next thing we want to do is to locate my Desktop on another Drive. So we would have to change the directory.
The change directory command to move up a level is:
The change directory command to move down a level is:
4. Type in the change directory command and locate your Desktop. In this case, my Desktop is on another Drive so I would change my directory to a different drive first. I would use the change directory command, then the letter of the drive followed by a colon.
- cd X:
As you can see, the directory has changed to drive “X.” The letter of your drive you want to get into could be different so make sure you are in the correct one!
5. Type the list command “ls” to list out the other folders that make up your current directory.
I want to get into my “Sleeping Daemon” folder where my Desktop is. Instead of typing out the full name of the folder, we can type in the first 3 letters and hit the tab button as a shortcut! It will auto-fill in the name of the folder you want to get into. You can also type in the name of the director in quotes.
You will see that we are now in “Sleeping Daemon.” It will only work as long as it fits towards a key description. Make sure you list a directory first to ensure such a folder exists.
The reason why we would want to use this shortcut or use quotes is that the terminal can’t read spaces. So if I was to type in “cd Sleeping Daemon”, I would get an error. We would have to add backlash or forward slash within the name to make it work.
6. Now try listing the new directory you are currently in!
7. Now try going deeper into another directory!
I am now on my Desktop!
Keep navigating around your directories. Change into another Drive if you have to. Get the feel before we head into our next article!