DEV Community

Cover image for Configuring Git/GitHub
Lupita Rivera
Lupita Rivera

Posted on

Configuring Git/GitHub

This will be a blog in two parts the first one Configuring Git/GitHub and the second Understanding more about Git/GitHub Commands which will be released soon. Lets gets get started!

but first you might ask what is the difference between local repository and remote repository?

The local repository is on your machine (git) and the remote repository is on the cloud (github). okay now lets get started.

Install git

Git generally comes pre-installed with most operating systems, but you can check by running git version in the terminal. If this gives you an error or does not come back with a version number, you'll need to install Git. You can install it using Homebrew.

1) Open the "Terminal"
2) Type brew install git and press <Enter>
3) Close the "Terminal"
4) Reopen the "Terminal"
5) Type git --version and press <Enter>

If you see a message starting with "git version...", continue below.

Create a GitHub Account

To work on and get credit for for your work, you will need to sign up for a GitHub account if you don’t already have one.
Github signup webpage

Configure Git and GitHub

Git is the tool that we’ll use to download and upload the work that we do. To use Git without signing in every time, you can create a Secure Shell (SSH) key and associate that to your GitHub account. This step will ask you to do work both in your browser and your terminal.

  1. Open the "Terminal"
  2. Type git config --global color.ui true and press <Enter>
  3. Type git config --global user.name + <Space> + your name and press <Enter> (Note: this should be your full name, not your GitHub username, in quotes.)
  4. Type git config --global user.email + <Space> + the email address you used to sign up to GitHub and press <Enter>
  5. Type ssh-keygen and press <Enter>
  6. For each prompt do not type anything, just continue to press <Enter>
  7. Type cat ~/.ssh/id_rsa.pub | pbcopy and press <Enter>. This will copy your SSH key to your clipboard
  8. Open the GitHub New SSH key form(Note: you need to be logged in to GitHub to access that link.)
  9. Type "My personal Mac" in the "Title" input field
  10. Paste what’s on your clipboard from step seven in the "Key" input field
  11. Click "Add SSH Key"

Hopefully this post will help some of you get started with Git/Github.

Top comments (0)