EasyEnv
Git
Beginner

Git

Learn Git for real. Commits, branches, remotes, rebasing, conflict resolution, recovery, and pull request workflows.

13 lessons5.9h hands-on11 languages
Start learning freeGit course

13 lessons, in order

  1. 1

    Init and Your First Commit

    Imagine you are writing an essay in a text editor, and every time you make a meaningful change, you save a full copy under a new name: essay-v2,...

    Git initGit configWorking treeStaging areaGit addGit commit
    25 min
  2. 2

    Status, Diff, and Log

    You made a commit in the last lesson, and that is exactly one snapshot. Real work involves editing files over and over, and before every commit you...

    Git statusGit diffGit diff --stagedGit logLog formatting
    25 min
  3. 3

    Branches and Merging

    Every commit you have made so far sits on one single line of history called main. Real work rarely stays that simple. You want to try an idea without...

    Git branchGit switchFast-forward mergeThree-way mergeMerge commit
    30 min
  4. 4

    Resolving Merge Conflicts

    The first time Git refuses to finish a merge, it can feel like something broke. Nothing broke. A merge conflict happens when two branches changed the...

    Merge conflict markersManual resolutionGit add after resolvingGit merge --abortMergetool
    30 min
  5. 5

    Remotes: Push, Pull, Fetch

    Everything you have done so far lives only on your own machine. That is fine for practicing, but real projects need a shared copy other people, or...

    Git remote addGit pushGit fetchGit pullUpstream tracking
    30 min
  6. 6

    Stash and Cherry-pick

    You are halfway through a change, files edited, nothing finished, when a teammate messages you: "can you look at a bug on main right now?" You cannot...

    Git stashGit stash popGit stash listGit cherry-pick
    25 min
  7. 7

    Rebasing

    You branched off main on Monday to add a search box. It is now Thursday, you have three commits, and in the meantime four other people have pushed to...

    Git rebaseReplay on topLinear historyWhen not to rebase
    30 min
  8. 8

    Interactive Rebase and Squashing

    Real work does not happen in one clean commit. You commit, then you commit again five minutes later because you spotted a typo, then a third time...

    Git rebase -iPickSquashFixupRewordAutosquash
    30 min
  9. 9

    Tags and Releases

    A branch like main is a moving bookmark. It points at whatever the latest commit happens to be, and the moment you commit again, it slides forward to...

    Lightweight tagAnnotated tagGit tag -aGit push --tagsGitHub releases
    20 min
  10. 10

    Branching Workflows

    Everything you have learned so far, branching, merging, rebasing, tagging, tells you what Git's commands do, but none of it tells you when to create...

    Trunk-based developmentGitHub FlowGit FlowShort-lived branches
    20 min
  11. 11

    Recovering Lost Work

    At some point you will type a command, press Enter, watch the terminal print something calm and final, and realise you have just deleted a day's...

    Git reflogRecovering from reset --hardGit fsck --lost-found30-day grace period
    25 min
  12. 12

    Hooks

    Every team has a rule that everyone agrees with and everyone forgets. Run the formatter before committing. Do not commit the debugging print...

    Client-side hooks.git/hooksPre-commitShell hook examplePre-commit framework
    25 min
  13. 13

    Capstone: A Full Pull Request Flow

    Everything so far has been one piece at a time: a commit here, a branch there, a rebase when the history needed straightening. In a real job those...

    CloneFeature branchPushGh pr createFixup commitsAutosquash rebase+1
    40 min
Git Course: Hands-on, in 11 Languages | Engineering Courses