Junior Track Roadmap

Advanced Git: rebase & stash

This course works through rebase and stash using this app's Git history and a disposable scratch repository. It shows a rebase that stops on a conflict and a commit that disappears when its patch becomes empty. It covers git commit --fixup with git rebase --autosquash, including the Git 2.44 change, and git rebase --onto for moving a branch to a new base. The stash lessons cover git stash push, list and show, the difference between apply and pop, untracked files with -u, and conflicts during stash pop.

What you'll learn

  • ✓Resolving a rebase conflict with git add and git rebase --continue, plus --abort and --skip
  • ✓Why a rebase drops a commit whose diff becomes empty
  • ✓Folding fixup commits with git commit --fixup and git rebase --autosquash
  • ✓Moving a branch to a different base with git rebase --onto
  • ✓Storing and reading uncommitted work with git stash push, list and show
  • ✓Choosing between stash apply and pop, and handling a stash pop conflict
Free preview · Lesson 1 4 min read

This app's Git history so far

Both commands ran against this project when this course was revised. These six commits are the work itself: lesson rewrites and one small app fix. What --no-merges hides is how they reached main. Each arrived through a pull request, and main records that with a merge commit ("Merge pull request…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...