GitHub Classroom
What is GitHub Classroom
GitHub Classroom is a part of the GitHub Education initiative, which helps students, teachers, and schools access the tools and events they need to shape the next generation of software development.
This course will be using GitHub Classroom for it Individual Assignments and the Group Project. For each assignment, students will use a special link that will take them to this course's GitHub Classroom. From there students will accept the assignment, and a personal, private repository will be created. From this repository students will receive assignments instructions and starter code, as well as submit completed assignments and received feedback.
Note
While the completed rubric and feedback of the completed project will be found on GitHub, final grades will also be posted on BrightSpace
Using GitHub Classroom
The following tutorial will walk through the steps from accepting an assignment to cloning the repository to submitting the final product and receiving a grade.
1. Getting the Assignment Invite Link
On the main course website (https://mtm6331.github.io), all individual assignments have a link to the assignment on GitHub Classroom.
2. Joining the GitHub Classroom
If this is your first assignment invite, you will be asked to identify yourself by your official Algonquin Email.
3. Accept the Assignment
For each assignment, GitHub will ask you to accept the assignment. This can be done by clicking on the "Accept this assignment" button.
By clicking the button, GitHub will create a personal and private assignment repository for you. This process will take just a few moments. When finished you should be presented with a success screen like this one.
4. Assignment Repository on GitHub
It possible to get to your private assignment repository from the link found on the success screen.
By clicking on link, you will be taken to the your private repository.
Your private repository will contain a README.md file with the assignment instructions, requirements, and rubric. There may be additional starter files in the repository as well.
5. Get the Cloning URL
The term cloning refers to copying a repository to another location. In this case, you will be cloning the repository to the local development environment.
The first step is the to get the cloning URL from GitHub. Find and click on the "Clone or Download" button.
A dropdown will appear with the URL needed to clone the repository. Click on the clipboard button to copy the URL.
6. Clone the Repository
Before you can clone a repository to your local development environment, you must know where to put the repository. For individual assignments, it is best to place cloned repository into your MTM6331 site.
You can find the folder location of your MTM6331
site by going to Local by Flywheel and click on the MTM6331
site. The folder path will be located just below the site name.
Click on the chevron next the folder path will take to the folder. Open the folder inside of Visual Studio Code.
With the MTM6331
opened in Visual Studio Code, open the Terminal in Visual Studio Code.
In the Terminal type the following commands and hit enter:
cd app/public
git clone https://github.com/MTM6331/about-me-eisenbraun.git
Note
Your repository URL will be different from the example above, be sure to use the URL copied from GitHub.
After entering the command the cloning process will begin. When finished the cloned repository project will be in the public folder of your site.
TIP
You may need to hit the refresh button at the top of the Visual Studio Code Explorer panel for the folder to appear.
7. Commit Changes
After the repository has been clone, you are free to make changes to the any of the project files and Git will keep track of those changes. Fortunately, Visual Studio Code has a build in GUI for using Git, and inform you when changes have been made.
TIP
An M
next to a file means that the file has been Modified
. A U
next to a file means that the file is Untracked
or a new file.
Using Visual Studio Code with Git also makes the process of committing changes much easier. When you are ready to commit the changes you have made, click on the source control icon from the Activity Bar.
From the Source Control side bar, you will be able to see all Modified
and Untracked
files.
Hovering over a file will reveal a set of buttons. The first control is Open File
, followed by Discard Changes
, and Stage Changes
. The Discard Changes
will revert the file back to it state since the last commit. If it is a new or Untracked
file, the file will be deleted. The Stage Changes
will add the file to the staging area so that it can be committed.
To commit a file, click on the Stage Changes
button.
The file will be moved to the staging area.
Add a message about what is being committed and / or the reason for the commit.
TIP
Messages should descriptive but short. Typically, commit messages are less than 70 characters long.
When you have added all the files you wish to commit to the staging area and have a message written, you commit the changes by click on the check mark or commit button at the top of the Source Control side bar.
8. Pushing commits to GitHub
Visual Studio Code when indicate that there are local commits that can be push to the remote repository, when a number and an up arrow in the Status Bar.
Click on the number and up arrow to push all local commits to GitHub.