Why use it?
Keep useful versions, see what changed, and safely try new ideas without naming files final-final-v3.txt.
See what happens behind every command.
Imagine improving your own pancake recipe. Git keeps the versions you choose to save. Learn that solo workflow first; add teammates once you understand your own history.
Keep useful versions, see what changed, and safely try new ideas without naming files final-final-v3.txt.
Git is the history keeper on your computer. You deliberately save a version called a .
GitHub hosts your repository online. Start with your own copy. The separate team path introduces collaboration later.
One person, one project. Build your own history before bringing in anyone else.
Use the same basics with other people. Join an existing project and combine everyone’s work.
Flour1 cup
Milk1 cup
Chocolate chipsNone
No changes selected yet.
Viewing saved version 1: Classic pancakes · no chocolate chips.
pancakes.txt holds the recipe instructions. Version 1 makes classic pancakes. Let’s try chocolate chips while keeping the original version.
Your GitHub copy has version 1 · Classic pancakes
This preview begins with an already saved recipe to explain the idea. Lesson 1 shows how to create that first saved version from an empty folder. Git tracks the recipe instructions, not the pancakes you cook. In real projects, a commit can save changes across many files.
Pick an answer. It is fine to try both.
Open a word whenever you need it. You do not need to memorize them all.
git init prepares a local repository and its hidden .git records. It creates no commits and does not connect to GitHub.
Usually shortened to “repo”. It contains the files and the Git record of saved versions.
A snapshot of the project with a message, an author, and links to earlier commits. Committing saves locally; it does not upload.
The exact content you have chosen for the next commit. Git also calls this the index.
A name that points to a commit. It moves forward as you save more work on that branch. Branches share their earlier history.
Git’s reference to where you are working. It usually points to your current branch.
A repository your local Git can exchange work with, often hosted on GitHub.
Upload commits and update the chosen branch in a remote repository. It does not send uncommitted edits.
Download remote history and update local remote-tracking bookmarks, such as origin/main. Your current branch stays in place.
| What happens in the recipe example | Git concept |
|---|---|
| You set up Git history keeping for your recipe folder. No saved versions yet. | |
| You change the pancake recipe on your computer. | |
| You choose which recipe changes belong in the next saved version. | |
| You save a version called “Add chocolate chips”. | |
| You try the chocolate variation separately from your main recipe. | |
| You store your empty GitHub repository’s address with the nickname origin. | |
| You send your saved recipe version to GitHub. | |
| You check for and download your own online recipe updates without changing your current version. | |
| You download your online updates and bring them into your current recipe. | |
| You bring your saved variation or downloaded update into main. | |
| You save a correction that reverses a mistake, keeping the earlier recipe versions. |
Tap a Git concept for its meaning. Return to Introduction whenever you need a reminder.
Learn these after the solo path. Other people now have their own copies and ideas.
| Team action | Git concept |
|---|---|
| You download the team’s existing recipe and its history. | |
| Your friend asks the team to include their improvement in your main recipe. | |
| You both changed the same sugar line differently and must choose a final amount. |
The lesson buttons run each action for you. Type commands only when you feel ready.
Type a command or choose a quick command. Your simulated history stays here when you switch tabs.
mainClick a commit to inspectGitHub hosts your online copy. Teamwork is a separate path.