Git Workflow
Use Git to record, branch, merge and undo work, and collaborate through reviewed pull requests on a shared repository.
4 objectives 6 steps about 110 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain the working tree, staging area, commits and refs, and make small, focused commits with clear messages.
- Create, merge and rebase short-lived branches and resolve a merge conflict without losing anyone's changes.
- Deliver a change through a pull request on a protected main branch, including review, required checks and a tagged release.
- Undo mistakes with revert, restore, reset and reflog, choosing the option that does not rewrite shared history.
Lesson plan
6 steps, about 110 min · 5 of 5 lessons available so far
- Git's model: snapshots, commits and pointers Concept · 15 min
- Commit hygiene: staging hunks and writing useful messages Worked example · 15 min
- Branching, merging and resolving a real conflict Lab · 25 min
- Pull requests, reviews and short-lived branches Concept · 20 min
- Recovering from mistakes without breaking teammates Lab · 20 min
- Check: repository-state challenges Knowledge check · 8 questions
Practise it
In a shared practice repository, deliver a feature through a pull request: branch from main, make three focused commits, resolve the conflict planted on main, address review comments, merge, tag the release, then revert a faulty commit that has already reached main.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own GitIntermediate · 10–20 h
- Build your own CI SystemIntermediate · 8–16 h
References
Hard prerequisites
None.
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.