Learn Git and GitHub from first commit to team workflow: branching, merging, pull requests, secrets, CI, and recovery tools for when things break.
It is 6 PM on a Friday at acme-shop. Two engineers have spent an hour editing the same deploy script, and one of them just emailed the other a file...
How to install Git and set your identity Install Git with your system package manager, then tell it who you are once.
Working directory, staging area, and repository Every change moves through three places: the working directory where you edit, the staging area where...
How to authenticate with SSH or HTTPS GitHub must verify who you are before you push, and there are two common ways.
How branches work A branch is an independent line of development, so you can build a feature without touching stable code.
How to undo at every stage The right undo command depends on how far the change has traveled. Before staging, discard it. After staging, unstage it.
It is 6 PM on a Friday at acme-shop. Two engineers have spent an hour editing the same deploy script, and one of them...
How to install Git and set your identity Install Git with your system package manager, then tell it who you are once.
Working directory, staging area, and repository Every change moves through three places: the working directory where...
How to authenticate with SSH or HTTPS GitHub must verify who you are before you push, and there are two common ways.
How branches work A branch is an independent line of development, so you can build a feature without touching stable...
How to undo at every stage The right undo command depends on how far the change has traveled.
What belongs in .gitignore A .gitignore file lists the files Git should never track.
How the pull request flow works A pull request (PR) is how teams move code from a feature branch into main.
What CI does on every pull request Continuous integration (CI) means every push and PR automatically triggers a fresh...
Skip this topic on your first read. Come back when you need to clean up history, recover lost work, or hunt down a bug.
📌 Remember: Do every step in order. Together they cover the workflow real teams use every working day, including the...
Quick reference Common mistakes Committing directly to main on a team with branch protection skips the review and CI...
Roles that use the skills in this module.
DevOps Engineer
Site Reliability Engineer
Cloud Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetGit is the version-control tool that runs on your computer and records the history of your files. GitHub is a website that hosts Git repositories and adds pull requests, issues, and automation. You can use Git without GitHub, but not GitHub without Git.
Use git revert with the commit hash. It adds a new commit that cancels the change and leaves history intact, so teammates who already pulled are not affected. Avoid git reset on pushed commits because it rewrites history.
No. The password stays in every earlier commit. Rotate the credential first, treating it as public, then rewrite history only if you must. Deleting the file in a new commit does not remove it from history.
Merge is safer and keeps the full record of what happened. Rebase gives a straight-line history but changes commit hashes, so use it only on commits nobody else has pulled. Pick one convention for your team and stay consistent.