Skip to Main Content

Intro to Git Workshop: Home

Intro to Git: Description

This guide provides additional resources to supplement the hands-on Intro to Git Workshop offered at the UNC Libraries: learn how to use Git, one of the most popular version control systems in the world. You don't have to be a developer to git started!

The last workshop was taught on Tuesday, March 13, 2018 at Davis Library.


  1. Download and install the latest version of Git
  2. Create a free GitHub account


Basic Git Commands Cheatsheet

Setting up Git

$ git config --global "Mona Lisa"
Sets your username in Git; can be different than GitHub username
$ git config --global ""
Sets your email address in Git; should be same as GitHub email address so GitHub can associate your commits with your account

Creating Git Repositories

$ git init
Turns any folder into a Git repository
$ git clone
Copies an existing repository to your computer
$ git remote add origin
Links your local repository with your remote repository

Making Changes

$ git status
Returns status of changed files in your git repository
$ git add
Adds changes made to a given file or set of files ( in this example) to your staging area
$ git commit -m "Add"
Saves a snapshot of changes with a summary message
$ git push origin master
Syncs commits from your local repository up to your remote repository
$ git log
Returns list of local commits, or a history of saved snapshots
$ git pull origin master
Syncs commits from your remote repository down to your local repository


$ git diff
View unstaged changes made to all files in your git repository
$ git remote add upstream && git pull upstream master
Syncs your forked repository to the original repository (for more information, see GitHub's Configuring a remote for a fork.)

Other Resources

More Tutorials:


  • SourceTree: a free Git GUI that offers a visual representation of your repositories without having to use the command line

Other Resources:

Science Libraries Chat

JavaScript disabled or chat unavailable.

Therese Triumph

Profile Photo
Therese Triumph
G301E Venable Hall
Kenan Science Library