Git exercise (due October 10)
Introduction
In preparation for your next project you will be practicing working with git for this exercise.
This exercise is done with your teammate (if possible). If working on your own please complete the steps yourself.
Instructions
For this exercise there are no pre-built files but we do recommend you work with reference material on git available to you, such as this week's reading or the recommended resources.
This exercise is done with your teammate (if possible). Steps for each teammate have been separated by T1 (teammate 1) and T2 (teammate 2) in the instructions below. If working alone, please complete all steps.
For this week's exercise:
- T1, please start a new SFU GitHub repository with a readme file.
- T1, add T2 as a collaborator to your new repository if they do not already have access.
- T1, create a new file entitled
.gitignore
in the repository and place the contents of this sample into your.gitignore
file. This will ignore problematic files often generated by the Mac OS. - T1, stage and commit your changes with a meaningful commit message. Once done, push the changes to the remote repository.
- T2, clone the repository to your local computer.
- T2, create a new file entitled
.gitattributes
in the repository and place the contents of this sample into your.gitattributes
file. This will make sure that things like images are not read as if they were code by git. - T2, stage and commit the changes with a meaningful commit message. Once done, push the changes to the remote repository.
- T1, pull the changes. Confirm you both have the same files.
- T1, create a new branch called
updatingReadme
. T2, create a new branch calledaddingIndex
. Make sure you are both 'in' the new branch you have created. - T1, edit the
readme.md
file in the repository to include an explanation of your repository. - T2, create a new file entitled
index.html
in the repository using the linked bare-minimum HTML5 template. - Both T1 and T2, stage and commit the changes with a meaningful commit message.
- Both T1 and T2, switch into the
main
branch and individually merge your changes from theupdatingReadme
andaddingIndex
branches. - T1, push your changes to the remote repository.
- T2, pull the changes and complete merging your changes. Once done, push your changes to the remote repository.
- Confirm the changes have been pushed by visiting the repository on SFU GitHub.
Please submit the URL of your repository (on GitHub) to the Canvas assignment.
Your submission is due before 8:30am on October 10.
Grading rubric
This code exercise is worth 1% (1 point) of your final grade.
- 0.75 points for completing the exercise steps, extra 'error' steps are okay.
- 0.25 points for clear commit messages.
Recommended resources
- Atlassian Git Tutorial: A command-line (and language) overview of how to use git.
Exercise rules reminder
Please remember that the exercise rules still apply:
- You can use online resources, course materials, your TA, and lab-mates for support. This being said, others are not allowed to do your work for you. Also, if you are drawing from online resources, course materials, your TA or peers, you must;
- Cite any knowledge that is not yours in a comment in the code. The internet is a huge repository of information and you are welcome to use it, but you must let us know when something does not originate from your own knowledge.
- If work has been copied without citation the exercise grade will be zero. Please make sure to include comments indicating where you had assistance or learned.