Git

git stash

CautionStash changes

git stash push -m "wip"

Temporarily shelves uncommitted changes to restore later; handy before switching.

Examples

  • git stash popRestore the stash

Syntax

git stash [push -m <msg>] | list | pop | drop

Before you run it

drop/clear discard stashes.

Used when you see

Stuck in Git (push rejected / conflict)
3
Stash if neededShelve work temporarily
See the whole flow →

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store