From b0115bc2ba2482e5e5036585eabe3ac07c17c1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Eahin=20Akkaya?= Date: Sat, 17 Dec 2022 15:01:12 +0300 Subject: [PATCH] TIL: Stashing staged changes --- git/stashing-staged-changes.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 git/stashing-staged-changes.md diff --git a/git/stashing-staged-changes.md b/git/stashing-staged-changes.md new file mode 100644 index 0000000..f4de4cc --- /dev/null +++ b/git/stashing-staged-changes.md @@ -0,0 +1,9 @@ +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" + +```