Skip to content
Ameen Abozaid
BEG-047

GitHub

  • 5 Lessons
  • 58 min of reading
  • 2 h practice (estimate)
On this page 8 topics

Overview

Topics

  • Remote repositories
  • push/pull
  • pull requests
  • README
  • Markdown

Learn first

58 min of reading · 2 h of practice (estimate)

Learning outcomes

  1. Connect a local repository to a GitHub remote and push and pull.
  2. Open a pull request, respond to review comments, and merge.
  3. Write a README in Markdown with description, setup, and usage.

Lessons

  1. 01Remotes, push, and pull12 min read
  2. 02Authentication with GitHub (SSH keys or tokens)12 min read
  3. 03Pull requests and reviews11 min read
  4. 04Markdown and a good README12 min read
  5. 05Demo: publishing a project and reviewing a pull request11 min read

Lab and exercises

Lab

BEG-047-LAB1 · Public portfolio start

Outcomes: 1–3 · Time: ~2 h Publish two projects to GitHub, each with a README. Open a PR for a small change and have a peer review it. Acceptance: repos public; PR has at least one review round.

Exercises (assessment: portfolio check)

IDOutcomeTask
BEG-047-EX011Create a GitHub repo, connect it to a local repo as origin, and push main.
BEG-047-EX021Clone your repo into a second folder, commit there, push, then pull in the first folder.
BEG-047-EX031Set up SSH or a token and show that git push works without asking for the account password.
BEG-047-EX042Make a change on a branch and open a PR with a title and a description.
BEG-047-EX052Review a classmate's PR: leave one line comment and approve; answer a comment on your own PR and merge.
BEG-047-EX063Write a README with description, setup, and usage sections for one project.
BEG-047-EX073Ask a peer to follow only your README to run the project; note where they got stuck and fix it.
Show solutions
  • EX01 git remote add origin <url>, git push -u origin main.
  • EX02 git clone <url> copy, commit and git push in copy, then git pull in the original.
  • EX03 For SSH: ssh-keygen, upload the .pub file, git remote set-url origin git@github.com:you/repo.git.
  • EX04 git switch -c small-change, commit, git push -u origin small-change, then "Compare & pull request".
  • EX05 Use the Files changed tab for line comments; push the fix to the same branch; use Merge pull request.
  • EX06 Headings # Title, ## Setup, ## Usage with exact commands and the Java version.
  • EX07 Typical gaps: missing Java version, missing build command, wrong folder; add them to the README.

Quiz

Outcomes: O1 remotes, push, pull · O2 pull requests · O3 README.

A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.

  1. 1The usual name of the main remote is:O1
  2. 2Which command sends local commits to the remote?O1
  3. 3Which command copies an existing remote repo to your computer?O1
  4. 4With SSH keys, what do you upload to GitHub?O1
  5. 5Where should a personal access token be stored?O1
  6. 6A pull request is:O2
  7. 7After a review comment you should:O2
  8. 8Why avoid pushing directly to main?O2
  9. 9Markdown for a level-one heading:O3
  10. 10Which README part is most often missing?O3

Practical part

Portfolio check: two public repos with READMEs and one PR with a review round (lab and EX01–EX07). Pass: at least 8 of 10 quiz questions and both repos runnable from the README alone.

Common mistakes

Pushing directly to main; READMEs without setup steps.

Assessment

Portfolio check.

Career relevance

Portfolio and every team workflow afterward.

Type to search levels, phases, modules and lessons.