Skip to content

Instantly share code, notes, and snippets.

@celesteburke
Created June 8, 2011 19:12
Show Gist options
  • Save celesteburke/1015129 to your computer and use it in GitHub Desktop.
Save celesteburke/1015129 to your computer and use it in GitHub Desktop.
Bash script that grabs a git tag and applies stashed changes (for android development). Helpful when bouncing between multiple versions and testing.
#!/bin/bash
VERSION=$1
echo "Using version " $VERSION
echo "\nStashing changes.."
git stash
echo "\nChecking out new version.."
git checkout $VERSION
echo "\nPopping changes.."
git stash pop
echo "\nRemoving old binary.."
rm ./bin/*.apk
echo "\nDone!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment