Skip to content

Instantly share code, notes, and snippets.

@keinajar
Last active January 19, 2018 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keinajar/c52d90cded491f82ffbbf5939fc1b044 to your computer and use it in GitHub Desktop.
Save keinajar/c52d90cded491f82ffbbf5939fc1b044 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir git-stash-test
cd git-stash-test
mkdir component
mkdir common
touch component/a.scss component/b.scss common/c.scss
git init .
git add .
git commit -m "Added files"
echo "modifications for a" > component/a.scss
touch common/untracked.scss
git status -s
git stash push -m "stashing scss" -- *.scss
git status -s
git stash pop
Initialized empty Git repository in /Users/keinajar/git-test/git-stash-test/.git/
[master (root-commit) d4e31ce] Added files
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 common/c.scss
create mode 100644 component/a.scss
create mode 100644 component/b.scss
M component/a.scss
?? common/untracked.scss
Saved working directory and index state On master: stashing scss
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: component/a.scss
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (e47f5f26ea805e7a2245f90d7502d56a15707fe6)
@keinajar
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment