Skip to content

Working with GitHub — Module Recap

Module 05 is complete. Your local Git knowledge now extends to the internet — you can publish repositories, keep them in sync, and retrieve existing repositories onto any machine.

Git vs GitHub — Git is local version control software. GitHub is a hosting platform for Git repositories. They are separate. Your local repo and GitHub repo are two independent copies, synced via push and pull.

Creating a repository on GitHub — Use the + icon on GitHub. Key decision: create an empty repo (no initialization options) when you already have local commits. Initialize on GitHub when starting fresh, then clone.

Connecting a local repo to GitHubgit remote add origin <url> registers the remote. git push -u origin main pushes your commits and sets the upstream tracking relationship. Authentication: HTTPS requires a Personal Access Token; SSH uses keys.

Pushing and pullinggit push sends your new commits to GitHub. git pull fetches and merges commits from GitHub. git fetch downloads without merging, letting you inspect before integrating. git status shows whether your branch is ahead, behind, or diverged from the remote.

Cloninggit clone <url> downloads a repository to your machine with origin pre-configured and the full history included. Use it when getting a repo onto a new machine or joining a team project.

CommandWhat it does
git remote add origin <url>Register a remote named origin
git remote -vList remotes and their URLs
git push -u origin mainPush and set upstream tracking
git pushPush current branch to its upstream
git pullFetch and merge from upstream
git pull --rebaseFetch and rebase instead of merge
git fetchDownload remote commits without merging
git log main..origin/main --onelineShow commits on remote not yet local
git clone <url>Clone a repository to this machine
git clone <url> <dir>Clone into a specific directory name
git branch -aList all branches including remote-tracking

What’s next — Pull Requests and Collaboration

Section titled “What’s next — Pull Requests and Collaboration”

Module 06 introduces the pull request workflow — the standard way teams propose, review, and merge changes on GitHub. You will learn to create feature branches, open pull requests, respond to review comments, and merge with confidence.

Pull requests are not a Git concept — they are a GitHub feature layered on top of Git branches. Understanding branches (Module 03) is the foundation for understanding pull requests.