Working with GitHub
Log on to CPEN 331 UBC GitHub organization.
If you don't have an account with UBC GitHub, create one. Log on to CPEN GitHub.Create OS161 code repository
- Click on the New button to create a new repository.
- Under Repository template
select
CPEN-V-331-101-V2024W1/template-os161-1.99.08 . Make sure that the Repository Owner isCPEN-V-331-101-V2024W1 . - If you are creating a repository for assignments 1-3:
For Repository name type
individual-CWL , replacing the bold letters with your CWL. For example, if your CWL isspeedykangaroo , your repository name will be:individual-speedykangaroo . - If you are creating a group repository for assignments
4-6: For Repository name
type
group-CWL1-CWL2 , replacing the bold letters with the CWLs of you and your partner in alphabetical order. For example, if your CWL isspeedykangaroo and your partner isdashingcheetah , your repository name will be:group-dashingcheetah-speedykangaroo . - Once you created the group repo, you will need to invite your partner as the collaborator. To do that, while on your repository page, click on the Settings cogwheel icon at the top right, then click on the Collaborators at the menu on the left, click on the green button =Add people and find your partner by their CWL id.
- Make sure your repository is private. We will not grade public repositories. Click Create.
Prepare to access your repository
On the next screen, if you click on Code button, GitHub will show the URL that you will use for cloning the repo on your computer. Use the SSH option. For example, for yourClone your repository
Using the URL obtained in the previous step, you can now clone your repository to your local machine as follows. Open a shell, go to any directory where you'd like to keep your work, we will call itgit cloneYou can create multiple clones of your repositories, which you might want to do if you are using different machines to do your work. Just remember to always commit and push your code periodically, so you don't lose it in the event your local disk crashes and so that you can always access it from another clone. Committing and pushing your work is described here.src
Additional configuration
Finally, to correctly track the user committing the code, run the following commands:
git config --global user.name "Your Name" git config --global user.email "yourname@server.ca"