Git: getting started

Lesson 06 · 10 min

stash: putting unfinished work away

You urgently need to switch branches but it's too early to commit — stash. You'll get it back later.

10 minLesson 6 of 8Practice includedAsk AI on any point

git stash removes uncommitted edits (but not untracked files by default: a plain stash doesn't take new files without -u) and gives you a clean HEAD. git switch other. Later, git stash pop. A conflict during pop is like a merge: you fix the files.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.