Skip to content

Lesson 08 — A Complete Beginner Workflow

Practice the full Git/GitHub workflow from start to finish.

clone → branch → edit → status → add → commit → push → PR → review → merge → pull

If you do not already have it locally:

Terminal window
git clone https://github.com/organization/repository-name.git
cd repository-name
  • I am inside the repository folder.
Terminal window
git checkout main
git pull

or:

Terminal window
git switch main
git pull
  • I am on an up-to-date main branch.
Terminal window
git checkout -b docs/add-practice-note

or:

Terminal window
git switch -c docs/add-practice-note
  • I created a branch for my change.

Edit a file, such as README.md.

  • I made one small change.
Terminal window
git status
  • I can see my changed file.
Terminal window
git add README.md
  • I staged the file.
Terminal window
git commit -m "docs: add practice note"
  • I committed the change.
Terminal window
git push -u origin docs/add-practice-note
  • I pushed the branch to GitHub.
  • I opened GitHub.
  • I created a PR from my branch into main.
  • I added a short title and description.

If feedback is requested:

Terminal window
git add README.md
git commit -m "docs: address feedback"
git push
  • I understand that pushing to the same branch updates the PR.

After review:

  • The PR is approved or ready.
  • The PR is merged.
  • The branch is deleted on GitHub if no longer needed.
Terminal window
git checkout main
git pull

or:

Terminal window
git switch main
git pull
  • My local main has the merged change.
  • I completed one full Git/GitHub workflow.
  • I can describe each step in my own words.
  • I know to use branches instead of changing main directly.
  • I know to use PRs for review before merging.
  • I know to run git status often.