Skip to content

Getting set up with Git and GitHub

EvanT edited this page May 5, 2021 · 19 revisions

In preparation of the Git and GitHub training workshop, please make sure to have a Bash Shell and Git installed.

If you do not have admin access on your computer or have any difficulty meeting these prerequisites please contact [email protected].

1. Create a free GitHub account.

Many of you already have one, but in case you don't please sign up using the link above.

2. Email your GitHub username to [email protected].

Eventually I'll need to add you as member of our project's GitHub organization.

3. Install the Bash Shell and Git

Mac and Linux.

Bash is already installed (no action required). Install Git using these instructions.

Windows.

EDIT: The simplist way to use Git with Windows 10, is to download and install Git Bash. You can now do this without needing the Windows Subsystem for Linux, which is what the previous directions below walk you through.

The easiest pathway on Windows is to turn on "Windows Subsystem for Linux" following these instructions these instructions. This may require a restart after enabling the "Windows Subsystem for Linux", and an issue where the command prompt won't load for you to type bash. In this case, use these instructions to fix the issue.

4. Configure Git user name and email

Open Bash (Terminal in Mac, Git Bash in Windows) and enter the following commands to configure Git. (Note that $ represents the command prompt; the commands themselves start with the word git.)

$ git config --global user.name "Your Name"
$ git config --global user.email "your@email"

This is only required once. Your user name and email will be recorded with each change you make to documents tracked with Git. The email address should be the same one you used when setting up your GitHub account.

5. (OPTIONAL) Set your preferred text editor

Git sometimes opens a text editor automatically so you can complete a task. The Git default is the Vi/Vim text editor, which some users may find difficult to use. To change the default text editor run the command below and indicate your preferred editor. This can be any text editor, but common choices are "notepad" on Windows and "nano" on Mac or Linux.

$ git config --global core.editor "notepad"