At the heart of GitHub is an open source version control system (VCS) called Git. Git is responsible for everything GitHub-related that happens locally on your computer.

If you're not comfortable using the command line right now, GitHub lets you complete many Git-related actions without using the command line, including:

However, if you find that you need to use Git, we can help you set it up!

Tips:

Tips:

Tip: to learn more about Git, see "Getting Started - Git Basics" on the git-scm website.

Input

Code blocks like those on this page are part of a scripting language called Bash. To use Bash scripts, we need to use an application that comes with your Mac called Terminal, usually found at /Applications/Utilities. Open Terminal was installed with Git called Git Bash. Git Bash can be found in the start menu under "Git".Open Git Bash comes with Linux called Terminal. Open the terminal comes with your OS called the command line.

echo 'This is input text'
# This tooltip tells you what's going on.

A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing.

Output

This is output text.

A line that does not begin with a $ is output text that is intended to give you information or tell you what to do next. We've colored output text green in these bootcamp tutorials.

User Specific Input

echo 'username'
# Outputs the text in the quotation marks.
Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in TerminalTerminalGit Bashthe command line.

Good to know: There will be times when you type code, hit return, and all you are given is another prompt. Some actions that you execute in TerminalTerminalGit Bashthe command line don't have any output. Don't worry, if there is ever a problem with your code, TerminalTerminalGit Bashthe command line will let you know.

For security reasons, TerminalTerminalGit Bashthe command line will not display what you type when entering passwords. Just type your password and hit the return key.

Setting up Git

  1. Download and install the latest version of Git.
  2. On your computer, open the Terminal application.
  3. Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

    git config --global user.name "YOUR NAME"
    
  4. Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one found in your email settings. To keep your email address hidden, see "Keeping your email address private".

    git config --global user.email "YOUR EMAIL ADDRESS"
    
  1. Download and install the latest version of GitHub Desktop. This will automatically install Git and keep it up-to-date for you.
  2. On your computer, open the Git Shell application.
  3. Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

    git config --global user.name "YOUR NAME"
    
  4. Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one found in your email settings. To keep your email address hidden, see "Keeping your email address private".

    git config --global user.email "YOUR EMAIL ADDRESS"
    
  1. Download and install the latest version of Git.
  2. On your computer, open the Terminal application.
  3. Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

    git config --global user.name "YOUR NAME"
    
  4. Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one found in your email settings. To keep your email address hidden, see "Keeping your email address private".

    git config --global user.email "YOUR EMAIL ADDRESS"
    
  1. Download and install the latest version of Git.
  2. On your computer, open your command line application.
  3. Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

    git config --global user.name "YOUR NAME"
    
  4. Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one found in your email settings. To keep your email address hidden, see "Keeping your email address private".

    git config --global user.email "YOUR EMAIL ADDRESS"
    

Next steps: Authenticating with GitHub from Git

When you connect to a GitHub repository from Git, you'll need to authenticate with GitHub using either HTTPS or SSH.

Connecting over HTTPS (recommended)

If you clone with HTTPS, you can cache your GitHub password in Git using a credential helper.

Connecting over SSH

If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub.

Celebrate

Congratulations, you now have Git and GitHub all set up! What do you want to do next?