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
- Before downloading Git, check to make sure you don't already have
Git installed on your computer.
- 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. - Enter the following command and then press Enter:
git --version
- If you see a version number, you already have Git installed. If you don't see a version number, you need to install Git.
- Open a command prompt by clicking the Start button and typing
- To install Git for Windows. Go to
git-scm.com/downloads and select Download for
Windows.
An .exe file will be downloaded. - Double click that .exe file to open and run the installation executable. The process
of installing Git will start.
- Allow the installer to make changes to your computer.
- Select Next through all of the setup windows, leaving all the defaults. There will be many windows.
- The last window will let you select Install and then click Finish.
- 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. - Enter the
git --version
command and then press Enter to see if Git is installed. You should see the version number. - 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.
- Type in this configuration command to set the global git username:
and select Enter. Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global user.name "yourusername"
- Enter this configuration command to set the email:
Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global user.email "youremail@byui.edu"
- Type in this configuration command in order to not ignore case changes in files and
folder names:
Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global core.ignorecase false
- Type in this configuration command to set the global git username:
macOS Users
- Before downloading Git, check to make sure you don't already have
Git installed on your computer.
- Select the Search icon (it looks like an magnifying glass) on your screen near the top right of your screen.
- 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. - Type in
git --version
at the prompt and select Enter. - 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. - The installation may take a few minutes. With the installation, you will get a set of development tools, including Git.
- Type in
git --version
at the prompt and select Enter. You should now see the version number. - 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.
- Type in this configuration command to set the global git username:
and select Enter. Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global user.name "yourusername"
- Enter this configuration command to set the email:
Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global user.email "youremail@"
- Type in this configuration command in order to not ignore case changes in files
and folder names:
Nothing will happen if you did it right. If you get an error, you need to fix it.git config --global core.ignorecase false
- Type in this configuration command to set the global git username:
- If you want to check the global configurations, type
to review the user.name and user.email. Do not worry about the other configuration settings reported.git config --list
Linux Users
- Guide: Linux Git Install
- 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.