Git skills, freshly brewed
Git Brew Lab
A safe practice repo for branches, commits, pushes, pull requests, and merges.
Create a branch
Start from the shared project, then give your change its own safe place to grow.
Make a branch
Branches let you work without changing the team's shared main branch.
Stage the files
Staging chooses which edits go into the next commit. Pick at least one changed file.
Commit the change
A commit is a named snapshot that explains one change.
Push your branch
A push sends your local branch to the remote repository so GitHub can see it.
Your commit is local until you push it.
Open a pull request
A pull request asks to merge your branch into another branch; it starts a review, not an automatic merge.
Review before merging
A teammate checks the change, asks questions, or approves it before it joins the target branch.
Training simulation: the reviewer checked the map label change and found no blocking issues.
Merge the pull request
Merging brings the reviewed work into the target branch.
Your branch can now be merged into main.
Nice work. Your change is merged.
You made a branch, committed work, pushed it, opened a pull request, got a review, and merged it. The sample repo is ready for another round.
Bonus round: fetch vs. pull
Scenario: a teammate has pushed a new commit to main. Fetch checks for it; pull brings it into your current branch.
Your local branch has not checked for updates.
Quick glossary: clone, fork, and origin
- Clone
- Download a repository to your computer so you can work on it locally.
- Fork
- Create your own GitHub-hosted copy of someone else’s repository.
- Origin
- The usual nickname for the remote repository your local project connects to.