Skip to content

Instantly share code, notes, and snippets.

@dfabulich
Last active July 7, 2017 20:53
Show Gist options
  • Save dfabulich/6e7d006cd83f023cec7978bbeccd3e30 to your computer and use it in GitHub Desktop.
Save dfabulich/6e7d006cd83f023cec7978bbeccd3e30 to your computer and use it in GitHub Desktop.
#!/bin/sh -x
rm -rf sample
git init sample
cd sample
echo hello > testfile
git add testfile
git commit -m 'added testfile'
git branch other
echo goodbye > testfile
git commit -am 'modified testfile'
git checkout other
echo changed > testfile
git checkout master
#!/bin/sh -x
rm -rf sample
git init sample
cd sample
echo hello > testfile
git add testfile
git commit -m 'added testfile'
git branch other
echo goodbye > testfile
git checkout other
cat testfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment