til/git/stashing-staged-changes.md

10 lines
204 B
Markdown
Raw Normal View History

2022-12-17 13:01:12 +01:00
As of Git 2.35 you can stash only staged changes with `--staged` option.
```
$ git add foo
$ git stash push --staged
$ # You can also add a message with `-m`
$ git stash push --staged -m "message"
```