Lesson GIT

Introduction to Git

Individual Post-Class Exercises

In this lesson you're going to look at software called git (including our GitHub server and the Elegit client software).  All of this software is designed to make it easier to share your work with other people.

If you do upload your homework to GitHub (or anywhere else online)
then you're sharing your homework on the Internet,
which violates the plagiarism policy for this class.

On the one hand I can say that giving copies of your homework to other people is plagiarism (for both the person who copies, and for you) and that's certainly true.
On the other hand you need to know that even if you can copy someone else's work that you're really just hurting yourself.  You're in this class in order to learn this material, and in order to build these foundational skills you need to do this work on your own.  You need to watch the videos, do any background reading that helps you, and then practice these skills yourself. 
Please do NOT copy work from other students - even if you can do it, you're just hurting youself.

  1. Lesson Setup

    1. Final Exam: Q+A & Review
      (This link leads to the same document as the link on the main page)

    2. Start-of-lecture Slides (Required)
      Online students will need to read these on their own. 
      Hybrid students will see them at the start of class.

    3. The Starter' project for Visual Studio 2015 is available on the GitHub server.  The below videos will walk you through connecting to the server and downloading the starter project

    4. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      There is no way to download all the videos at once for this lesson.  You may follow each of the VIDEO links below and download each video individually, if you'd like.

  2. Getting started with git - overview
    We're going to start by talking about what git is, and what it does for you

    1. VIDEO: Overview of git for this course
      Slides from this video

    2. VIDEO: An overview (and 'roadmap') of the numerous copies that you'll use
      Slides from this video

  3. Getting started with GitHub: working with an online repo, entirely online

    The URL for the server is:

    1. TODO: Adjust 'ROADMAP' images to say 'GitHub', not 'GitLab'

    2. VIDEO: Getting started with GitHub: working with an online repo, entirely online

      1. There's a tutorial that explains how to create an account AND how to get access to course-specific materials- you must read through it!

      2. As explained in the tutorial, you need to send your GitHub account information to the teacher by filling out this Google Form:

        • IMPORTANT NOTE: Your instructor will add students to the BIT 143 organization (in GitHub) periodically and NOT instantaneously.
          It may take several days for the instructor to add you to the organization, during which you may be unable to make progress on these PCEs.
          In fact, if you don't leave enough time you may not get access at all before the deadline falls.

      3. URL for the GH assignment: https://classroom.github.com/assignment-invitations/e1b55e4b2f2100d19f1b8254f60b7471

    3. VIDEO: Editing a file entirely online

      1. There's another tutorial that explains how to edit a file on GitHub.com

    4. Exercise: Working with an online git repo on the GitHub server (Hand-In)
      Note: the contents of this tutorial are basically the same as the above video - the written tutorial is provided in the hopes of providing students with a second form of the needed information.
      You may not need to examine both in detail.

    5. VIDEO: Uploading a new file to GitHub from your computer

      1. There's a tutorial to accompany the above video - please read through it!

    6. Exercise: Uploading a new file to GitHub (Hand-In)

    7. VIDEO: Removing a file from GitHub

    8. Exercise: Removing a file from GitHub (Hand-In)

    9. VIDEO: Restoring a deleted file on GitHub

    10. Exercise: Restoring a deleted file on GitHub (Hand-In)

  4. Getting started with git and Elegit- working with a git repo locally

    1. TODO:
      'Tagging your homework' also needs to be changed

    2. WARNING:
      Elegit is NOT installed on the school's computers. You can download it for free and run it on your own (either on your own, personal computer or on the school's computers)

    3. VIDEO: Getting started with git - working with a git repo locally

    4. Exercise: Download the repo (project) to your computer, make a change, and push it back to the server (Hand-In)
      Note: like the previous tutorial, the contents of this tutorial are basically the same as the above video.

      There's a note in the exercise about how the exercise should be hard enough to force you to download and work on the assignment but not impossibly hard.  When you get to the exercise about providing feedback on this lesson I'd particularly appreciate feedback about whether the exercise was both doable and complicated enough.

    5. VIDEO: Adding a new file to the local copy of your repo, using Elegit

    6. Exercise: Add a new file to your local repo (Hand-In)

    7. VIDEO: Removing a file from the local copy of your repo, using Elegit

    8. Exercise: Removing a file from your local repo (Hand-In)

    9. VIDEO: Restoring a deleted file in Elegit

    10. Exercise: Restoring a deleted file in Elegit (Hand-In)

    11. VIDEO: What to do if you change both your local repo and the copy in GitHub
      This example doesn't work because GitKraken will pull, then push, thus fast-foward auto-merging non-conflicting changes

    12. Exercise: Changing both your local repo and the copy in GitHub, then fixing it (Hand-In)

    13. Reference material:

      1. How to amend your homework in GitKraken

  5. Do an array-focused exercise, then push your work to the server

    1. Printing a histogram ( a vertical BarChart) (Hand-In)
      Remember that you'll be handing this in via git/Elegit/GitHub, by uploading your work to the GitHub server.

  6. Feedback To Improve This Lesson

    1. Fill out the "Lesson 10 Effectiveness Survey".  (Required)
      This is an online form.  Include your name when you fill it out and you'll get credit for the work (there is nothing to upload to the GitHub server)

      It's particularly important that you fill this out since this is the first time that the lesson is being offered.
      Your feedback will help improve this lesson for future students!

  7. Final Steps

    1. Hand-In for post-class exercises and for homework:
      Other than the required, online survey all the work that you can hand in for this lesson must be handed in by uploading your work to the GitHub server.
      The instructor will retrieve your work from the GitHub server, grade it, and upload your feedback to your repo (project) in the GitHub server.
      Because of this you do NOT need to hand in anything through StudentTracker.

    2. Practice what you've learned
      Remember that in order to really learn this stuff you're going to need to practice it.  Go back and redo the exercises from this lesson until you've really got it down.  Go back to the prior lesson(s) and review and redo that.  Make sure that you've really got this stuff in your head (and remember that it gets easier each time you redo the work)
Stuff to ignore:

The instructor is leaving this here to make it easy to find in the future. You should just ignore anything here :) 
Early draft of a 'command line' version of this lesson

This is the starter project for this Lesson

In-Class Materials:

In-Class Videos (These were recorded during this class, and are made available here in case you want to refer to them later)

Instructor's Materials: