WEEK 7 · LESSON 9 · TOPIC 6 OF 10 · Practical Application

Practical Application

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

A complete interruption workflow is:

  1. Confirm the current modifications.

git status

  1. Stash the unfinished work.

git stash

  1. Verify that the working directory is ready for switching.

git status

  1. Switch to the urgent branch.

git checkout development

  1. Complete the review or task.
  2. Return to the original branch.

git checkout main

  1. Restore the unfinished work.

git stash pop

  1. Continue editing, then stage and commit when the work is complete.

To preserve the stash after restoration, replace pop with apply:

git stash apply