WDD 130: Web Fundamentals

Setup: Git Installation

Overview

Git is a version control software framework that will run behind the scenes, tracking additions, updates, and deletions to your project files and folders. You will use git to commit files in your wdd131 project and push/upload your work to your GitHub, remote repository.

Instructions

Install Git on your computer

Select only one of the following instruction sets depending on your operating system.

Windows Users
  1. Before downloading Git, check to make sure you don't already have Git installed on your computer.
    1. Open a command prompt by clicking the Start button and typing cmd in the search box. The command prompt terminal will open.

      Alternatively, in VS Code, you can use the terminal panel to complete any command line task. use the Ctrl+` keyboard shortcut to toggle the terminal panel.

    2. Enter the following command and then press Enter:
      git --version
    3. If you see a version number, you already have Git installed. If you don't see a version number, you need to install Git.
  2. To install Git for Windows. Go to git-scm.com/downloads and select Download for Windows.
    An .exe file will be downloaded.
  3. Double click that .exe file to open and run the installation executable. The process of installing Git will start.
    1. Allow the installer to make changes to your computer.
    2. Select Next through all of the setup windows, leaving all the defaults. There will be many windows.
    3. The last window will let you select Install and then click Finish.
  4. Open a new Command Prompt window by closing the first Command Prompt window and start a instance by clicking the Start button and typing cmd in the search box.
  5. Enter the git --version command and then press Enter to see if Git is installed. You should see the version number.
  6. While in the Command Prompt, type in two more commands to set up our username and email that are associated with our GitHub account. Again, since these are global settings so you can type them from any path prompt.

    Make sure you to use your own username and email between the "" quotation marks. Use the username and email you used for the GitHub account. These will be different for each student.

    1. Type in this configuration command to set the global git username:
      git config --global user.name "yourusername"
      and select Enter. Nothing will happen if you did it right. If you get an error, you need to fix it.
    2. Enter this configuration command to set the email:
      git config --global user.email "youremail@byui.edu"
      Nothing will happen if you did it right. If you get an error, you need to fix it.
    3. Type in this configuration command in order to not ignore case changes in files and folder names:
      git config --global core.ignorecase false
      Nothing will happen if you did it right. If you get an error, you need to fix it.
Video Demonstration: ▶️ Windows Git Installation
macOS Users
  1. Before downloading Git, check to make sure you don't already have Git installed on your computer.
    1. Select the Search icon (it looks like an magnifying glass) on your screen near the top right of your screen.
    2. Type in "Terminal" and open the Terminal application. It doesn't matter what path our command prompt is showing. All the commands we type will work anywhere.
    3. Type in git --version at the prompt and select Enter.
    4. You should now either see a git version number or a pop up window that says something along the lines of 'The git command requires the command line developer tools ...'. If you see the git version number, you already have git installed and do not need to install git, but you will want to set your config setting as shown below. If you get the pop-up message, select Install and Agree.
    5. The installation may take a few minutes. With the installation, you will get a set of development tools, including Git.
    6. Type in git --version at the prompt and select Enter. You should now see the version number.
    7. While in the command prompt, type in additional commands to configure our username and email that are associated with our GitHub account. Again, since these are global settings you can type them from any path prompt.

      Make sure you use your own username and email between the "" quotation marks. Use the username and email you used to create your GitHub account. These will be different for each student.

      1. Type in this configuration command to set the global git username:
        git config --global user.name "yourusername"
        and select Enter. Nothing will happen if you did it right. If you get an error, you need to fix it.
      2. Enter this configuration command to set the email:
        git config --global user.email "youremail@"
        Nothing will happen if you did it right. If you get an error, you need to fix it.
      3. Type in this configuration command in order to not ignore case changes in files and folder names:
        git config --global core.ignorecase false
        Nothing will happen if you did it right. If you get an error, you need to fix it.
    8. If you want to check the global configurations, type
      git config --list
      to review the user.name and user.email. Do not worry about the other configuration settings reported.
Video Demonstration: ▶️ Git Install for Mac
Linux Users
  1. Guide: Linux Git Install
  2. Install Git using the link above and then follow the last few steps from the Windows or Mac instructions to set up your global config username and email settings to match your GitHub account.