Last updated for remote use by D. Carr - May 2021
1. Go here if you need a GitHub account or must install Git.
Windows users should start git by starting the "Git Bash" program, while Mac users should just be able to open up a normal terminal. On your machine, run these git config commands below (in any directory) to set your name, email, and preferred options.
Examples:
git config --global user.name “Sheila Kannappan”
git config --global user.email sheila@physics.unc.edu
git config --global color.ui "auto"
git config --global core.autocrlf false
Note user.name is not your GitHub username but rather your name.
(Our git tutorial assumes you will use nano as your editor. If you accidentally have another text editor, such as vi, set as your default and would like to switch to use nano, you can use the command git config --global core.editor "nano".)
You can check what you’ve done with
git config --list
Press q to quit out of the above command. You can get more details on config option by typing
git config -h # short version
git config --help # long version
- Automated Version control
- Creating a repository
- Tracking changes
- Exploring history
- Working with branches
- Setting up a remote repository in GitHub
- Collaborating
This tutorial borrows heavily from Software Carpentry's tutorial Version control with git and Software Carpentry's branching tutorial from erdavenport, both under a Creative Commons Attribution license (CC BY 4.0)