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'
sed -i 's/bar 2/bar two/' bar.txt git commit --quiet . -m "change line 2 in bar.txt"
'foo 6 ' >> foo.txt
git stash
sed -i 's/bar 5/bar five/' bar.txt git commit --quiet . -m "Urgent fix in bar.txt"
git stash pop
git commit . --quiet -m "add foo 6"