Setting up Git and GitHub
Follow along this guide to install and configure Git, create a GitHub account, and link Git to GitHub
It is very important that these steps are done correctly so that you can follow along!
Installing Git
You will need to install Git on your local machine.
Configuring Git
To ensure that Git installed correctly, run the following command:
git versionYou should see a line of output like this:
git version 2.54.0Once Git is installed on your local machine, tell Git who you are:
git config --global user.name '<your full name>'
git config --global user.email '<your email address>'Then, tell Git about your preferred default code editor:
git config --global core.editor '<editor executable>'For example, to use Visual Studio Code as your default editor for Git, replace <editor executable> from above with code --wait :
git config --global core.editor 'code --wait'Setting up GitHub
Create a new GitHub account if you don't have one.
Make sure that the email address used for your GitHub account is the same as the one configured in Git!
Check the current email address configured in Git with:
If they differ, re-configure Git to use your GitHub email address:
Then, connect Git to GitHub with SSH:
To verify that your SSH connection to GitHub is working correctly, refer to this GitHub documentation, or run the following command:
You should see output like this:
Congrats! You have successfully installed Git, and configured it to connect to GitHub on your local machine! 🥳
Last updated