Git is a free, open-source distributed version control system. You’ll use it to track the history of changes to your files, collaborate with others, and more!
If this is your first time going through the setup guide on your current machine, skip this “Verify” section and move on to the “Install” section below
In your terminal, run:
git config --list
IF the output is similar to:
user.name=[Your name is here] user.email=[Your email is here] code.editor=code --wait init.defaultbranch=main
Then move on to next page
else if the output is not similar to the above:
Continue with instructions on this page.
Note: To exit the git config --list
screen, type the letter q
in your terminal
Run the following command to ensure that you have the most recent version of git:
brew install git || brew upgrade git
In order to use Git locally in a secure manner, we need to connect our computer with github.com. (For further information about this process, visit GitHub Instructions: Caching GitHub credentials)
Install CLI by completing the following steps:
brew install gh
gh auth login
Authenticate Git with your GitHub credentials (Y / n)
, press y
and enterLike artists, programmers sign their work. Let’s configure Git to sign your commits with your name and email address.
WARNING:
Before running the following commands one line at at time, use the arrow keys or backspace/delete keys on your keyboard to move your cursor.
Replace YOUR FULL NAME
and YOUR EMAIL ADDRESS
inside the single quotes with the name and email from Your GitHub Account
git config --global user.name 'YOUR FULL NAME'
git config --global user.email 'YOUR EMAIL ADDRESS'
git config --global core.editor "code --wait"
git config --global init.defaultbranch main