Helmsman Academy
Git, zero to expert

Git in teams: rebase, undoing anything, strategies, pull requests, power tools and hooks

6 lessons · about 102 minutes of reading · Helmsman Pro

This page is the public course outline. Lessons, labs, tools and exams open after you sign in to your free account.

Sign in and start

In short

How teams use Git: rebasing and interactive rebase, undoing any mistake, branching strategies and semantic releases, pull requests and review with rulesets and CODEOWNERS, stash, worktrees, cherry-pick and bisect, and hooks with secret scanning.

Before you start: Course 59.

What you'll learn

Lessons

1. Rebase and interactive rebase: clean history without fear

How rebase replays commits, when to rebase versus merge, interactive rebase to squash, reorder and reword, autosquash with fixup commits, and the golden rule.

Sign in to open the lesson

2. Undoing anything: restore, reset, revert, reflog and recovery

Pick the right undo for every situation: uncommitted changes, the last commit, pushed commits, a bad merge, deleted branches and dropped stashes.

Sign in to open the lesson

3. Branching strategies, releases and versioning

Compare trunk-based development, GitHub flow, GitLab flow and Git Flow; choose for your team; tag releases with semantic versions; and use release branches and hotfixes well.

Sign in to open the lesson

4. Pull requests and code review on GitHub and GitLab

Open pull requests that get merged, review well, and protect important branches with rulesets, required checks, CODEOWNERS, signed commits and merge queues.

Sign in to open the lesson

5. Power tools: stash, worktrees, cherry-pick, bisect and blame-aware search

Switch context without losing work, work on two branches at once, move single commits, and find the commit that broke something with bisect, automatically.

Sign in to open the lesson

6. Hooks and quality gates: pre-commit, commit-msg and secret scanning

Automate checks before code leaves a laptop and before it reaches main: client hooks, the pre-commit framework, commit-message linting, secret scanning, and server-side enforcement.

Sign in to open the lesson

Common questions

I rebased and everything looks wrong. Can I undo it?

Yes: git reflog shows the branch before the rebase; git reset --hard <that entry> restores it.

How long are unreachable commits kept?

Usually until gc prunes them after about two weeks (gc.pruneExpire), and reflog entries for 30 to 90 days.

Do feature flags replace branches?

They replace long-lived branches; short branches for review remain useful.

GitHub rulesets or classic branch protection?

Rulesets: they layer, apply across many repositories in an organisation and can be managed as code.

Can two worktrees have the same branch checked out?

No; Git prevents it so the branch isn't moved under you.

Do hooks run in CI?

Not automatically; run pre-commit run --all-files (or the tools directly) as a CI job.