Skip to content

Guides for using GitHub for our class assignments.

Notifications You must be signed in to change notification settings

dmarshNAIT/GitHub-HowTo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

GitHub-HowTo

We will be using GitHub for all the coding assessments in this course. This includes 3 parts:

  1. accepting the assignment, then
  2. downloading the starter files to your computer, and finally
  3. uploading your completed assignment.

Let's look at each of those 3 parts. Each is demonstrated with an animated GIF, which is followed by written instructions of the same. If any of this is not accessible enough, please let me know!


Part 1. Accepting the assignment

1-Accepting

  1. Find your assignment on Moodle, and click on the link that starts with classroom.google.com.
  2. The first time you accept an assignment for each course, you'll be invited to select your name from the class list. This connects your GitHub account with your actual human name.
  3. Click the big green Accept button. This will create a repository for you: a private folder that contains all the starter files for your assignment.
  4. Click Refresh and you'll see a link to your repo in blue text.

Part 2. Downloading the starter files

There are a few different ways to do this. You do not need to do all of them, just one!


Option A: Using GitHub Desktop (recommended)

In order to use this approach, you will need to download Git (which is a system for tracking changes to computer files) as well as GitHub Desktop (an application that makes the Git process a little easier).

2a-desktop

  1. First, open up your repo in a regular internet browser. If you lost the link, you can always click the classroom.google.com link from the previous step, and it'll show you the same blue repo link again.
  2. Click the big green button that says Code then select Open with GitHub Desktop.
  3. This launches GitHub Desktop. You can choose where on your computer you'd like to save the contents of this repo. Click Clone, which makes a copy of the repo's contents in that location on your computer.
  4. Now, you can open it up in your file explorer and view and edit all those files!

Option B: Using the browser

Please only use this as a backup in case you're having issues with GitHub Desktop, as this is a manual process. 2b-download

  1. First, open up your repo in a regular internet browser. If you lost the link, you can always click the classroom.google.com link from the previous step, and it'll show you the same blue repo link again.
  2. Click the big green Code button then Download Zip.
  3. Done. Don't forget to extract (unzip) the file before using its contents!

Option C: Using the command line

GIF coming soon: for now, check out this documentation for how to clone using the command line: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository


Part 3. Uploading your completed assignment

Once you've made changes, it's time to get those changes on GitHub so your instructor can review them.


Option A: Using GitHub Desktop (recommended)

3a-desktop

  1. After you've saved your changes, open up GitHub Desktop.
  2. You should see a little summary of all your changes. Add in a brief description of what you've done (e.g. "submitted final version", "fixed validation bug", etc) then click the blue Commit button. This saves a new version of your entire repo. Then, click Push: this uploads that latest version to GitHub, and you're done!
  3. To make sure it did upload properly, you can always open your repo in your browser and view your changes there.

Option B: Using Visual Studio Code (an alternative recommended approach)

3b-vscode

  1. Once you've saved your changes, head over to the Source Control tab within Visual Studio Code.
  2. Find your project in the list. Add in a brief description of what you've done (e.g. "submitted final version", "fixed validation bug", etc) then click the blue Commit button. This saves a new version of your entire repo. Then, click Sync: this uploads that latest version to GitHub, and you're done!
  3. To make sure it did upload properly, you can always open it in your browser and view your changes there.

Option C: Using the browser

This is not a recommended approach: please only use this manual process as a backup plan. 3c-upload

  1. Open your repo in a regular internet browser.
  2. Click the Add File button then Upload Files.
  3. Select the changed file, then Commit. You're done!
  4. You can confirm the changes were uploaded by opening the file in your internet browser.
  5. If you see both the old version of the file as well as the new one, please delete the old one, otherwise you may lose marks on your assignment for having extra files or if the old version is marked instead. Click the file name to open it, then click the menu in the top-right corner and Delete file: image.
  6. Ways to avoid the previous problem are: do NOT change the name of the files after downloading them, and please make sure you're uploading to the same folder you downloaded them from.

Option D: Using the command line

GIF coming soon. For now, check out the steps on GitHub: https://docs.github.com/en/repositories/working-with-files/managing-files/adding-a-file-to-a-repository#adding-a-file-to-a-repository-using-the-command-line

About

Guides for using GitHub for our class assignments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published