Need to finalize your app and check layout
You can finalize the app by committing changes, pushing to GitHub, and verifying responsiveness in browser dev tools
Where the world's code lives — and where AI agents now work too
The dominant code-hosting platform (repos, pull requests, Issues, Actions, Codespaces), launched 2008 and owned by Microsoft since 2018.
GitHub is the platform behind most of the code you'll ever touch: repositories, pull requests, Issues, and Actions for CI/CD, all built on Git. It's also where AI coding agents increasingly do real work — turning a GitHub Issue into a finished pull request without a human writing the code.
GitHub is the platform where code gets hosted, reviewed, and shipped — repositories, pull requests, Issues, and GitHub Actions for CI/CD. This chapter is about the platform itself, not the Copilot assistant (that has its own chapter): here the focus is how GitHub organizes collaboration, and how AI agents increasingly work directly inside it — the Copilot coding agent turns an Issue into a pull request on its own, and GitHub's official MCP server lets any AI agent read and write repos, Issues, and PRs.
Hosting and collaborating on code — and increasingly, the place where AI coding agents like the Copilot coding agent open pull requests on their own.
Proprietary and Microsoft-owned — no self-hosting on the free/cheap tiers, and workflows written in Actions YAML are hard to move elsewhere.
Free tier covers unlimited public/private repos; Team is $4/user/mo, Enterprise from $21/user/mo. Verified students get GitHub Pro and Copilot free via the Student Developer Pack.
Push and pull GitHub repositories over SSH without passwords
ssh -T git@github.com reports successful authenticationA GitHub Issue is a discussion thread used to track work, bugs, or feature ideas.
You will be able to open an issue with a title, description, and label in any repository you own.
GitHub Copilot agents can read an issue and automatically create code changes packaged as a pull request.
You will trigger the Copilot agent to produce a PR that implements the work described in your issue.
Create an editable local project folder that is linked to its remote origin
git clone URL> replacing URL> with the copied addresscd and verify the clone by running git statusModify a file, create a commit, and push the change to the remote repository using GitHub Desktop
GitHub Actions are CI/CD workflows that automatically test code when a pull request is opened.
You will verify that the PR triggers an Action workflow and view its results.
.github/workflows/ci.yml) in the repository’s default branch that runs echo test on push.Merging a pull request integrates its changes into the target branch after review.
You will perform a code review of the Copilot PR, resolve any issues, and merge it safely.
85 outcomes in all — one per recipe below.
Need to finalize your app and check layout
You can finalize the app by committing changes, pushing to GitHub, and verifying responsiveness in browser dev tools
Need a local copy of a remote repo
You can duplicate a repository onto your machine with one command
Need to pick which files go into your next commit
You can select which changes to include in the next commit
Want to snapshot staged changes with a message
You can save a snapshot of your project history
Your commits don’t show who you are
You can identify yourself in commit history
Local commits aren’t appearing on the remote
You can share your work with others by pushing to a remote branch
You can review what will be committed or compare branches
Accidentally staged a file
You can remove a staged file without discarding its changes
My local branch is behind collaborators’ work
You can keep your local copy up to date with collaborators' work
Having to redo the same merge conflicts every time
Turns on Git's ability to remember and replay merge resolutions
Older builds crash loading MTP models
Older builds crash when loading MTP models; always use the newest commit
I need to define a concrete task for my team
A well-scoped Issue tells anyone (or an AI) exactly what needs to change and how success is measured
Want to see an issue move across columns
Linking the Issue to a Project creates a card you can move across columns as work advances
Want to change an issue’s state just by dragging its card
Moving a card reflects the current state of work without editing the Issue itself
Need a ready quantum learning workspace
Install the Microsoft Quantum Development Kit (QDK) extension, open an empty folder, and let the extension create lesson files. The folder acts as a persistent workspace so you can resume later.
Need a step‑by‑step quantum computing intro
The QDK learning panel provides a structured curriculum with units, lessons, and coding exercises. Clicking ‘Start Learning’ launches the interactive chat agent that tracks progress.
Want a specific quantum algorithm lesson but don’t know where it is
You can ask the built‑in QDK learning agent any question; it knows your current position in the curriculum and can jump you to specific units like Grover’s Search.
Each coding exercise can be solved directly in VS Code. Use the “Check my solution” button to run tests; if it fails, ask the agent for a hint or explanation.
Want the latest Git on macOS
Homebrew is a package manager for macOS that simplifies installing and updating software. Using it to install Git ensures you have the most recent version without manual downloads.
You want your commits to show who you are
Git records the author of each commit; configuring user.name and user.email ties changes to you and lets collaborators see who made what.
A folder isn’t under version control
`git init` creates the .git directory that stores all version‑control data, enabling Git to track changes in that folder.
Changes are staged and you need to record them
`git add` stages changes (moves them to the index) and `git commit -m "msg"` creates an immutable snapshot, forming the project history.
Want to develop a feature safely
Branches let you develop features in isolation; creating a new branch (`git checkout -b`), switching (`git switch`), and deleting (`git branch -d`) keep the main line stable.
I need to share my work and get others’ updates
`git push` uploads your commits to the remote repository; `git pull` fetches new commits from the remote and merges them, keeping both sides up‑to‑date.
Want reviewers to check and combine your changes
A PR lets you request that a branch be merged into another; reviewers can comment, approve, or request changes before the final merge.
Want to add files to a repo without the command line
The web interface lets you quickly add single or small groups of files by dragging them into the repo view and committing directly, useful for non‑technical uploads.
Password alone isn’t safe
2FA adds a second verification step (e.g., an authenticator app) after entering your password, protecting against credential theft.
Need a personal landing page on your profile
A repository named exactly after your username is treated as a special repo; its README.md is rendered on your profile, allowing you to showcase projects and personality.
Need online code storage
A repository is where your project’s code lives in the cloud, allowing you to back up and share it. Creating one on GitHub gives you a public or private container for your files.
Want to experiment without breaking the main line
A branch copies the current state of the main line of development, letting you experiment safely. Changes stay isolated until you decide they’re ready.
Finished feature branch ready to go
A pull request (PR) shows the differences between a feature branch and main, lets you review changes, and then merges them when approved.
Want a copy of a public repository on your PC
Cloning copies the entire repository (including history) onto your computer so you can edit files locally with any IDE.
Local code changes aren’t showing up on the remote
A commit snapshots your modifications; pushing uploads that snapshot to the remote repository so others can see it.
Need to track changes locally
Downloading and installing Git adds the core version‑control engine to your computer, enabling you to track changes in any project folder.
Want to handle Git repos without typing commands
GitHub Desktop provides a visual interface for common Git actions, letting beginners commit, branch, and sync with GitHub by clicking instead of typing commands.
Need teammates to check my code before it goes live
A PR lets teammates examine, comment on, and approve your branch before it merges into the main line, ensuring quality control.
Need to start tracking my project files
Initializing a repository creates a hidden `.git` folder that stores all history, allowing you to take snapshots of your work.
Need to lock in a version of your files
A commit captures the current state of staged files along with a descriptive message, forming a point you can later revert to.
Your commits are only on your PC
Pushing sends local commits to the remote repository, creating a cloud backup and enabling collaboration.
Need to isolate changes for a new idea
Branches give you an isolated line of development; you can experiment without affecting the stable main branch.
Feature work lives on its own branch and you need it in main
Merging combines changes from one branch into another; fast‑forward or three‑way merges keep history intact.
Two branches edit the same lines causing a conflict
When two branches edit the same lines, Git flags a conflict; you must edit the file to keep the desired version and then commit the resolution.
Made a bad change and need to undo it
Reverting creates a new commit that inverses the selected one, preserving history while restoring previous state.
Need a local copy of an existing project
Cloning copies the full history of a remote repo to your local machine, giving you a complete, editable copy.
Need the course code on your computer
Using Git you can copy the remote course repo to your Mac, giving you all sample Dockerfiles and YAML files needed for hands‑on practice.
Need to track a new project folder
Running git init in a folder tells Git to start tracking that directory, creating a hidden .git folder where all version data is stored. This establishes the working directory, staging area, and local repository needed for version control.
Need a local copy of a remote codebase
git clone downloads an entire remote repo (including its history) and sets up the local working directory, automatically creating the .git folder and linking it to the remote origin.
git status compares the working directory, staging area, and last commit to list modified, added, deleted, or untracked files, giving a quick snapshot of project state.
Need to move selected changes into staging area
`git add --all` or `git add -A` stages every modification, addition, and deletion across the whole repo; `git add .` stages only changes in the current directory tree; `git add <file>` stages a single file. Choosing the right form controls what gets committed.
`git reset` without options moves staged changes back to the working directory, leaving modifications untouched; `git reset --hard` resets both index and working tree to the last commit, discarding all local edits.
Want to lock in your staged edits
`git commit -m "message"` creates a new immutable snapshot of all staged changes, attaching author name/email (set via git config) and a message that describes the change.
`git rm <file>` removes the file from the working tree and automatically stages its removal, so the next commit records the deletion. Use `-f` to force removal of modified files, or `--cached` to keep the file locally but stop tracking it.
`git log` prints a chronological list of commits with IDs, authors, dates, and messages; `--oneline` condenses each entry to one short line, making it easy to copy a commit hash for later operations.
`git branch <name>` creates a new pointer to the current commit, giving an independent line of development. `git checkout <name>` moves HEAD to that branch, updating the working directory to reflect its snapshot.
`git merge <branch>` integrates commits from the specified branch into the current one, creating a new merge commit if needed. If conflicting edits exist, Git flags them for manual resolution.
Having to enter your password every time you push
An SSH key links your computer to your GitHub account so you can push and pull without repeatedly entering credentials. The public part is added to GitHub, while the private part stays on your machine.
Want to grab a repo without password prompts
Cloning over SSH uses the authenticated key, avoiding password prompts and ensuring you have write access for pushes.
Folder of code with no version history
Running `git init` creates a hidden `.git` folder that tracks changes, allowing you to push the code to a remote repository later.
Need to get my new project onto the remote repo
A commit records a snapshot of your files; pushing sends that snapshot to the remote repository, establishing the project history.
Want to track each change as you work
Each commit captures a logical change, making it easy to track history and revert if needed.
Accidentally changed code and need the old version
Git’s commit hash acts as a checkpoint; resetting or reverting restores the repository to that state without losing history.
Need an isolated spot to develop a feature
Branches let you develop new functionality without affecting the stable main branch, enabling parallel work streams.
Need to merge a feature branch into main
A pull request (PR) shows differences between branches, allows code review, and safely merges changes after approval.
Merged a PR and need to delete its branch
Removing branches that have been merged keeps the repository tidy and prevents accidental work on outdated code.
Want Git on your Mac
Homebrew is a package manager for macOS that simplifies installing software. By running its installation script and then using `brew install git`, you get the latest Git version without manual downloads.
Want version control on a Windows PC
The official Git for Windows installer guides you through a wizard that sets up Git, adds it to your PATH, and configures default options like the main branch name.
Want every commit to show who I am
Git records who makes each commit. Setting `user.name` and `user.email` globally ensures every repository you create attributes changes to you.
Need to begin tracking files in a folder
`git init` creates a hidden `.git` folder that stores all version‑control data, turning any directory into a repository ready for commits.
I want my edited files included in the next commit
`git add` moves files from the working directory into the staging area, marking them to be included in the next commit. Using `.` adds all modified files at once.
Want to save your current changes with a note
`git commit -m "message"` creates a new commit object that captures the current state of the staging area, attaching a descriptive message for future reference.
`git status` reports which files are tracked, staged, or untracked, helping you understand what will be committed next.
Multiple AI bots need separate code copies
Worktrees let each AI agent operate on its own copy of the repository, preventing file conflicts. By creating a separate worktree per issue, agents can modify code independently and later merge via pull requests.
You sign up at github.com by providing email, password, username and selecting the free plan. This gives you an online identity for storing repositories.
Download the desktop client from desktop.github.com, launch it, and authenticate with your GitHub credentials. The app then links locally stored repos to your online account.
In GitHub Desktop, choose File → New repository, give it a name, set a folder path, check “Initialize this repository with a README”, and select an appropriate .gitignore template (e.g., Swift). This creates a local repo ready for tracking files.
After creating the local repo, click “Publish repository” in GitHub Desktop, choose privacy settings, add an optional description, and confirm. This creates a matching remote repo on github.com and uploads your initial commit.
Modify files, then in GitHub Desktop write a concise summary in the “Summary” box and click “Commit to main”. This records a new commit (snapshot) of all staged changes.
If you have unsaved edits since the last commit, right‑click the changed file(s) in GitHub Desktop and choose “Discard changes”. This restores the files to their state at the previous commit.
Open the History tab, right‑click a past commit you want to undo, select “Revert changes in this commit”, then commit the generated revert. Repeat for each unwanted commit to step back further.
Need to track changes in a new folder
Running git init creates a .git folder that stores all history and metadata, turning any directory into a Git repository. This is the first step to track changes locally.
Need to choose which edits go into the next snapshot
git add moves changes from the working directory into the staging area, letting you choose exactly which modifications become part of the next snapshot.
Want to lock in your staged edits
git commit records a snapshot of everything in the staging area, attaching a message that describes the change. This forms an immutable point you can return to later.
Need a separate line for new feature work
Branches let you work on isolated features or experiments without affecting the main code. `git branch <name>` creates the branch, while `git checkout <name>` moves your working directory onto it.
I want to bring feature work into main
git merge combines the history of two branches, applying the differences from the source branch onto the target. This finalizes an experiment and brings its improvements into the main line.
Link my local folder to an online repo
Adding a remote assigns a nickname (origin) to an online URL, allowing you to push and pull between your local repository and GitHub.
Local commits don’t show up online
`git push origin main` sends your local branch’s commits to the remote named origin, updating the corresponding branch on GitHub so others can see and collaborate.
Want the newest teammate updates in your repo
`git pull origin main` combines `git fetch` (download) and `git merge` (integrate), bringing remote updates into your local branch so you stay in sync with collaborators.
Want the full Open Notebook code on your machine
Cloning the repository copies all required files to your local machine, giving you a complete, version‑controlled copy of the open‑source project ready for configuration.
The same set on /recipes, filtered by tool and role.
Shows how beginners can start tracking projects, use a visual Git client for commits and branches, and clone existing repositories locally
Explains core Git commands for managing changes and viewing history
Shows how to set up identity, initialize a local repository, and commit files using GitHub’s web interface
Shows how to set up SSH keys, initialize a repo without prior history, and revert changes using GitHub
Create a personal access token (PAT) that only includes the scopes you need: Repository admin, Contents, and Pull requests. In GitHub settings, generate a new PAT with those permissions and use it in your script.
Push the code to a public GitHub repository and add a deployment link (e.g., Render, Vercel, Heroku). Reviewers can then open the repo online and click the live demo link to run the application in their browser.
Stage all changed files, commit them with a message (for example, "final"), and push the commit to the target repository such as portfolio-website-tutorial. The push event starts the automated build defined in your workflow.
No. You can sign up at github.com with just an email, username, and password, and you’ll immediately get a free account that can host repositories.
Go to Settings → Manage access in your repo, click Invite a collaborator, enter the person’s GitHub username, and assign them read/write or admin rights. They will then be able to push changes directly to the repository.
personal access tokenscopesdeployment linkcommitpushbranchpull request (PR).github/workflows/YAMLActions tabecho commandMIT licenseAsk, share, or report — over on the Heidelberg AI community forum.