Git Stash Commands

Most common commands that I use. Self-explanatory.

Save and List Stash

  • git stash save “Some message”
  • git stash list # stash is available to all branches.
  • git stash show stash@{0}
  • git stash show -p stash@{0} #detailed view

Apply stash

  • git stash pop stash@{0}
  • git stash apply stash@{0}

Delete Stash

  • git stash drop stash@{0}
  • git stash clear
Posted in git

Leave a Reply

Your email address will not be published. Required fields are marked *