Search notes:

git stash

Stash the changes in a dirty working directory away.
git  init --quiet repo
cd   repo

'foo 1
foo 2
foo 3
foo 4
foo 5
'       > foo.txt

'bar 1
bar 2
bar 3
bar 4
bar 5
'        > bar.txt

git add *
git commit --quiet -m 'add file.foo, file.bar'
Github repository about-git, path: /commands/stash/intro/init.ps1
sed -i 's/bar 2/bar two/'   bar.txt
git commit --quiet . -m "change line 2 in bar.txt"
Github repository about-git, path: /commands/stash/intro/change-bar-2.ps1
'foo 6
'           >> foo.txt
Github repository about-git, path: /commands/stash/intro/add-foo-6.ps1
git stash
Github repository about-git, path: /commands/stash/intro/stash.ps1
sed -i 's/bar 5/bar five/'  bar.txt
git commit --quiet . -m "Urgent fix in bar.txt"
Github repository about-git, path: /commands/stash/intro/change-bar-5.ps1
git stash pop
Github repository about-git, path: /commands/stash/intro/stash-pop.ps1
git commit . --quiet -m "add foo 6"
Github repository about-git, path: /commands/stash/intro/commit-add-6.ps1

See also

.git/logs/refs/stash
git commands

Index