Preparing GitHub for EECS 441 Labs
There are several ways to interact with GitHub. In this course, we will use GitHub Desktop, which provides a visual interface to interact with GitHub and is independent of any IDEs. If you are proficient with git, you don’t have to use GitHub Desktop. However, we can only help with GitHub Desktop, so if you use anything else, you will be on your own.
- If you do not have a GitHub Student account, please get the GitHub Student Developer Pack so that you have access to GitHub Wiki, which you will need for your course project.
GitHub requires a personal access token to use HTTPS git. Please follow GitHub’s instructions to create a personal access token.
- Download and install GitHub Desktop
- Link to your GitHub account: on GitHub Desktop navigate to
Preferences > Accounts > Sign In
. A window will pop up and you can choose between signing in using your browser and signing in using your GitHub username and password
Create your 441
GitHub repo
On your browser, create a new, PRIVATE 441
repo with your GitHub account. If you don’t know how, follow GitHub Docs’ Create a repo instructions.
Name the new repo 441
and set its visibililty to Private
. Check Add .gitignore
, choose either
Android
(notKotlin
) if you’re developing on Android, orSwift
if you’re developing for iOS,
and click the big green Create repository
. (You will be overwriting the .gitignore
later, this is just the simplest way to create a non-empty repo.)
Note: for this and subsequent labs, we will assume your folders/directories are named according to the “canonical” names used in the spec. You can choose a different name other than
441
, but be aware that you’d have to map the names used in the specs to your naming scheme in all labs, for both front and back end.
Please invite ve441staff@gmail.com
as collaborator to your repo:
- On your GitHub site on your browser, click on
Settings
, the right most menu item (you may have to click on the...
to reveal it). - Click on
Manage access
on the left menu, and click on the big greenInvite a collaborator
button - Enter
ve441staff@gmail.com
and click the matching name that shows up - Click the big green button,
Add ve441staff@gmail.com to this repository
If you’re working on the lab as a team, please keep your lab’s solution in ONE member’s 441
git repo ONLY. Invite your team mate to your repo by navigating to Settings > Manage access > Invite a collaborator
as per above and enter your team mate’s GitHub account or jAccount email address.
Clone your 441
GitHub repo to your laptop
- Navigate to your newly created
441
GitHub repo on your browser - Click on the green
Code
button and selectOpen with GitHub Desktop
- Tell your browser to allow GitHub Desktop to launch
- In the
Clone a Repository
dialog box that GitHub Desktop pops up, edit theLocal Path
text field to where you want to put all your 441 labs, e.g.,/home/Users/yourusername/courses/441
orC:\yourusername\courses\441
, and clickClone
This will create a new folder under Local Path
, which we will subsequently refer to using the tag YOUR_LABSFOLDER
. To prepare your git repo:
- Download a copy of the course gitignore and save it in
YOUR_LABSFOLDER
as.gitignore
(note the leading dot before the filename). If your laptop OS prevents you from saving a file with a leading dot in its name, download the file to yourYOUR_LABSFOLDER
asgitignore
without the leading dot and then run in Terminal or PowerShell:laptop$ cd YOUR_LABSFOLDER laptop$ mv gitignore .gitignore
This overwrites the
.gitignore
GitHub added earlier when creating your repo. - Create a sub-folder
YOUR_LABSFOLDER/lab1
to hold your project files for lab1. - From GitHub Desktop commit these changes and push them to your
441
repo on GitHub.
Back to: Chatter Kotlin | Chatter Swift |
Resources
Following are some useful resources to familiarize you with GitHub Desktop.
- Getting started with GitHub Desktop: clone, create a branch, merge, resolve conflicts
- GitHub Docs
- How to revert a commit
- Stashing and rebasing
Prepared for EECS 441 by Mark Wassink, Rithika Ganesh, and Sugih Jamin | Last updated: September 6th, 2022 |