Skip to main content

Giving your Git stash a name

Posted in Development and Git

Out of the box, git stash will automatically name the stash as follows:

  1. Stash index number
  2. The branch you were on when the changes were stashed
  3. The commit hash commit name before the stash was created

Number 3 isn’t all that useful if you’re not planning on applying your stash any time soon. I prefer to name the stash more descriptively so that if I pick it up in, say, a month’s time, I’ll have a good idea of what I was doing.

git stash save "Nicely descriptive name of the stash"

Now, when I’m looking over my list of stashes, I’ll be able to remember what each one was for.

Accessibility in your inbox

I send an accessibility-centric newsletter on the last day of every month, containing:

  • A roundup of the articles I’ve posted
  • A hot pick from my archives
  • Some interesting posts from around the web

I don’t collect any data on when, where or if people open the emails I send them. Your email will only be used to send you newsletters and will never be passed on. You can unsubscribe at any time.

More posts

Here are a couple more posts for you to enjoy. If that’s not enough, have a look at the full list.

  1. Upgrading from iPhone 13 mini to 16 Pro

    I get a new phone every 3-ish years, give mine to my wife, and now she gives hers to our daughter. I got a 16 Pro this year! Here’s the skinny.

  2. Apple, you’re doing the Dynamic Island wrong

    I love the idea of Dynamic Island; making lemons into lemonade and all that. But, in my opinion, Apple have got the fundamentals mixed up.