Skip to content

Latest commit

 

History

History
150 lines (99 loc) · 4.96 KB

File metadata and controls

150 lines (99 loc) · 4.96 KB

Instructions for Setup

What to Install

  1. Install Git.

  2. Download VS Code as your code editor.

  3. Set up SSH keys for GitHub.

  4. (optional) Sign up for a GitHub account and the GitHub Student Pack.

Setting up the Homework Repo (with SSH)

  1. Navigate to your preferred folder and clone the repository.
$ git clone git@github.com:caterinasworld/fullstack-homework.git fullstack-homework

Cloning into 'fullstack-homework'...
remote: Enumerating objects: 179, done.
remote: Counting objects: 100% (179/179), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 179 (delta 94), reused 149 (delta 73), pack-reused 0
Receiving objects: 100% (179/179), 39.81 KiB | 251.00 KiB/s, done.
Resolving deltas: 100% (94/94), done.
  1. Navigate into the newly created fullstack-homework folder and rename the remote.
$ cd fullstack-homework/

$ git remote -v
origin	git@github.com:caterinasworld/fullstack-homework.git (fetch)
origin	git@github.com:caterinasworld/fullstack-homework.git (push)

$ git remote rename origin homework

$ git remote -v
homework	git@github.com:caterinasworld/fullstack-homework.git (fetch)
homework	git@github.com:caterinasworld/fullstack-homework.git (push)
  1. Navigate to your GitHub account and create a public repository, i.e. student-repo-fullstack.

    Important: Do not create a README file. There’s already one in the repository you have cloned.

  2. Add your discussion group members as collaborators.

    Go to ‘Settings’ → ‘Manage Access’ → click the “Invite a collaborator’ button. Search for everyone's names, emails, or GitHub handles.

  3. Add the GitHub repository you created as a remote.

$ git remote add origin git@github.com:student-username/student-repo-fullstack.git

$ git remote -v
homework    git@github.com:caterinasworld/fullstack-homework.git (fetch)
homework    git@github.com:caterinasworld/fullstack-homework.git (push)
origin   git@github.com:student-username/student-repo-fullstack.git (fetch)
origin   git@github.com:student-username/student-repo-fullstack.git (push)
  1. Check the branch name. If it's not ‘main,’ update the branch name to ‘main’.
$ git branch

$ git branch -M main
  1. Push the files you cloned into the newly created remote repository.
$ git push -u origin main
Enumerating objects: 163, done.
Counting objects: 100% (163/163), done.
Delta compression using up to 4 threads
Compressing objects: 100% (74/74), done.
Writing objects: 100% (163/163), 68.15 KiB | 13.63 MiB/s, done.
Total 163 (delta 80), reused 163 (delta 80), pack-reused 0
remote: Resolving deltas: 100% (80/80), done.
To github.com:student-username/student-repo-fullstack.git
 * [new branch]      main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.
  1. Once 'main' is set up to track the remote origin, you can push changes with the following command.
$ git push
  1. When there are updates to the homework starter files, pull the new updates from the ‘homework’ remote.
$ git pull homework main

Submitting a Pull Request (PR)

  1. Create a new branch.
$ git branch <newbranch>
$ git checkout <newbranch>

or

$ git checkout -b <newbranch>
  1. Make changes to your code in that branch.

  2. Commit the changes to the remote.

$ git add <filename>

$ git commit -m <commitmessage>

$ git push <remote> <branchname>
  1. When your code is pushed to the remote, you will see a link to the PR in the commnand line. Alternatively, you can open the remote repository on GitHub and search for your PR in the "Pull requests" tab.

  2. Add the students from your Canvas discussion group as reviewers on the pull request.

    In the PR description, make sure to explain what changes you made, why you made those changes, and what feedback you are looking for.

Required Reading