Every thing you need to know to master git, Part 6, git stash

Sometimes you have made some changes into your local copy and you don’t want to make a commit because your code doesn’t compile, but something came up and you should change your branch for instance and you will lose your local changes. In this situation, you can stash your changes and save your changes and change your branch for instance.

Let’s have a complete example:

now we make some change:

now let’s stash changes:

we can list and drop changes by:

 

Leave a Reply

avatar
  Subscribe  
Notify of