Skip to content

Git Foundations — Course Recap

Git Foundations is complete. You have covered version control from the ground up — from git init on a blank folder to a published, live portfolio project on GitHub.

The problem version control solves, how Git stores history, installing and configuring Git, the three-area model (working tree, staging area, repository), and making your first commit. You created the git-practice repository that carried you through the course.

Reading git status and git diff to understand exactly what has changed and what is staged. Writing commit messages in imperative mood with a clear subject and meaningful body. Using git log with flags (--oneline, --graph, --author, --grep, --stat) to navigate history. Viewing specific commits with git show.

Branches as lightweight movable pointers. Creating and switching branches with git switch. Merging — fast-forward and merge commits. Resolving conflicts. Branch naming conventions (feature/, fix/, docs/). Deleting merged branches locally and on the remote.

The full toolkit for undoing work at every stage:

  • git restore <file> — discard working-tree changes
  • git restore --staged <file> — unstage without losing changes
  • git commit --amend — fix the last commit (for unpushed commits only)
  • git revert — create a new commit inverting a past commit (safe for shared history)
  • git reset — move the branch pointer backward (for local commits only)
  • git reflog — recover from accidental hard resets

The distinction between Git (local software) and GitHub (hosting platform). Creating repositories on GitHub — empty for existing local repos, initialized for new projects. Connecting with git remote add, pushing with git push -u origin main, pulling with git pull, downloading without merging with git fetch. Cloning with git clone.

Module 06 — Pull Requests and Collaboration

Section titled “Module 06 — Pull Requests and Collaboration”

The pull request workflow from branch to merge. Reading diffs on the Files Changed tab. Leaving inline comments and submitting reviews. Three merge strategies: merge commit, squash and merge, rebase and merge. Resolving merge conflicts in a PR — locally (preferred) or in GitHub’s web editor. PR best practices: small focused changes, clear descriptions, professional feedback.

Preparing a real project for Git (.gitignore, initial commit, branch name). Publishing to GitHub. Writing a README that serves as a portfolio document. Tagging a release with an annotated tag and a GitHub Release. Enabling GitHub Pages to host the live site.

At https://yourusername.github.io/summit-trail-outfitters/, your STO site is live on the internet. It is linked from your GitHub profile and has a README describing what you built and what you practiced.

This is what the “GitHub as portfolio” concept means — not just code sitting in a repository, but a published project with visible history, a release tag, and a live URL.

CommandWhat it does
git initInitialize a new repository
git config --global user.name/emailSet identity
git statusShow working tree and staging area state
git add <file>Stage a file
git add .Stage all changes
git add -pStage changes interactively
git commit -m "msg"Create a commit
git commit --amendReplace the last commit
git log --onelineOne-line commit history
git log --graph --allBranch graph
git diffUnstaged changes
git diff --stagedStaged changes
git show <hash>Show a specific commit
git branch <name>Create a branch
git switch <name>Switch to a branch
git switch -c <name>Create and switch
git merge <branch>Merge a branch into current
git branch -d <name>Delete a merged branch
git restore <file>Discard working-tree changes
git restore --staged <file>Unstage a file
git revert <hash>Create an inverse commit
git reset --soft HEAD~nUncommit, keep staged
git reset HEAD~nUncommit, keep unstaged
git reset --hard HEAD~nUncommit and discard
git reflogLog of all HEAD movements
git remote add origin <url>Connect to a remote
git remote -vList remotes
git push -u origin mainPush and set upstream
git pushPush current branch
git pullFetch and merge
git fetchDownload without merging
git clone <url>Clone a repository
git tag -a v1.0.0 -m "msg"Create an annotated tag
git push origin --tagsPush all tags

Intermediate Git topics:

  • Interactive rebase (git rebase -i) for editing commit history
  • git stash for temporarily shelving work in progress
  • git bisect for finding the commit that introduced a bug
  • git cherry-pick for applying a single commit from another branch
  • Signing commits with GPG

In practice:

  • Contribute to an open-source project on GitHub — a real pull request to a real project
  • Set up a team project with branch protection rules on main (require PR reviews before merging)
  • Configure a CI workflow (GitHub Actions) to run tests automatically on every push

This learning path:

The Git Foundations course is a prerequisite for everything that follows. Every subsequent course — whether it introduces a framework, a build tool, or a backend technology — assumes you are committing your work, working on branches, and pushing to GitHub. Those are no longer separate skills to learn; they are just how you work.

Congratulations on completing Git Foundations. The JavaScript Development Track starts here:

Intermediate JavaScript →