Created
August 10, 2011 16:45
-
-
Save meonkeys/1137368 to your computer and use it in GitHub Desktop.
demonstrate git stash conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmpdir=`mktemp -d` | |
echo creating new repo in $tmpdir | |
set -x | |
cd $tmpdir | |
git init | |
echo -e 'blah\nfoo\nbar' > a | |
echo -e 'hello world' > b | |
git add a b | |
git commit -am 'first' | |
echo -e 'blah\npoop\nbar' > a | |
echo -e 'goodbye world' > b | |
git stash | |
echo -e 'blah\npee\nbar' > a | |
git commit -am 'changes in file a will conflict with stash' | |
git stash pop | |
git status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment