Stashing

suggest change

Syntax

Parameters

Parameter Details
show Show the stash as a diff against its original parent. With no stash named, shows the latest one.
list List current stashes. stash@{0} is the latest. Each line includes the branch that was current and a short description of the commit the stash was based on.
pop Remove one stash from the list and apply it to the working tree.
apply Like pop, but leave the stash in the list.
clear Remove every stash. Those commits can then be pruned and may be impossible to recover.
drop Remove one stash from the list. With no argument, removes stash@{0}.
create Create a stash commit and print its object name, without storing it in the ref namespace. Meant for scripts. Prefer save or push.
store Store a commit created by git stash create in the stash ref. Meant for scripts.

Remarks

Stashing allows us to have a clean working directory without losing any information. Then, it’s possible to start working on something different and/or to switch branches.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents