Git Stash

Over at softwarecave there’s a nice post on using git stash. In git, the stash is basically a stack on which you can push your current changes while you so something else. Maybe you want to change branches without committing your changes or perhaps you need to get rid of your current changes and work on something else in the current branch.

The post covers how to manipulate the stash. It turns out that it’s remarkably flexible. If you’re an Emacs/Magit user, the stash is usable from the magit-status buffer. If you’re a git user, and especially if you’re a Magit user, you should check this post out. It will make your life and work flow easier.

This entry was posted in General and tagged , . Bookmark the permalink.

2 Responses to Git Stash

  1. Phil says:

    Also note that a few days ago (the ever-industrious!) tarsius closed an old magit support request for supporting git stash --patch which is absolutely brilliant news. I’ve not yet tried it (it’s committed to the next branch), but as a heavy user of the git stash I am extremely happy about this news.

    In short, you should be able to use magit’s normal un/staging mechanisms to select exactly what you wish to stash, instead of the all-or-nothing behaviour magit has had until now.

  2. Xah Lee says:

    thanks jon. I’ve never used stash before. Now i will, great simple tutorial.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>