1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00

Add Include A Message With Your Stashed Changes as a git til

This commit is contained in:
jbranchaud
2020-07-16 19:11:45 -05:00
parent 6766419d90
commit f5ff391eb6
2 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
# Include A Message With Your Stashed Changes
If you were to quickly stash some changes, you end up with a stash reference
that git would attach a little context to, such as the latest commit SHA and
the first line of its commit message.
```bash
$ git stash list
stash@{0}: WIP on master: 6766419 Add link to source for latest TIL
```
Often this won't provide you the needed context to return to your stash and
pick up where you left off even days later.
You can customize the message of a stash with the `-m` flag.
```bash
$ git stash push -m 'made some changes'
```
When you view your stash list, you'll see your custom message.
```bash
$ git stash list
stash@{0}: On master: made some changes
```
And hopefully that's the context you need to hit the ground running.
See `man git-stash` for more details.