Read more

Git: Stash unstaged changes

Arne Hartherz
November 16, 2010Software engineer at makandra GmbH

This will stash all modifications that you did not git add:

git stash -k
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show snapshot

Note that newly created (and non-added) files will remain in your working directory unless you also use the -u switch.

git stash -k -u

Also, your working directory must be clean (i.e. all changes need to be added) when you git stash pop later on.

Posted by Arne Hartherz to makandra dev (2010-11-16 19:16)