git
and GitHub
Introduction to git
and GitHub
Objectives |
---|
|
Prerequisites
The following should be done before doing the exercises below.
1. Install GitHub Desktop
For this tutorial we will be using GitHub Desktop. To install:
- Go to https://github.com/apps/desktop.
- Click the “Download now” button.
- What you do next depends on your operating system:
- If you’re on a Mac:
- Click “Download for Apple silicon” or “Download for Intel chip” depending on your processor. If you’re not sure what processor you have, click the apple button in your Menu bar then “About This Mac”. Look at the “Chip” entry in the window that pops up. If it says, “Apple M…” you have Apple silicon. If it says, “Intel …” you have an Intel chip.
- Clicking one of the download buttons will download a .zip file that starts with “GitHubDesktop”. Once it’s finished downloading, open it. The file will unzip and open a Finder window.
- Move the GitHub Desktop icon into your Applications folder in Finder.
- Open GitHub Desktop as you would any other application (e.g., by going to Launchpad and clicking on the GitHub Desktop icon).
- The first time you open GitHub Desktop you will be prompted with a warning, “‘GitHub Desktop’ is an app downloaded from the internet. Are you sure you want to open it?” Click “Open”.
- If you’re on a Windows machine:
- Click “Download for Windows (64 bit)”. This will download a file called “GitHubDesktopSetup-x64.exe”.
- Once the file downloads, it will automatically install and open GitHub Desktop.
2. Setup GitHub Desktop
The first time you open GitHub Desktop you will need to sign into GitHub.
- Click “Sign in to GitHub.com”. If you do not have an account yet, click “Create your free account”.
- Follow the on-screen instructions to sign in.
- After you sign in, GitHub Desktop will ask you to “Configure Git”. We recommend you select the option “Use my GitHub account name and email address”. Click “Finish”.
You will next be prompted with a “Let’s get started!” screen that will ask you to add a repository to GitHub Desktop. Stop here and go to Part 1.
Exercises
Appendix
The above exercises all use GitHub Desktop. In the appendix, the exercises are repeated using the command-line interface for git
.