Skip to content

Instantly share code, notes, and snippets.

@adrienjoly
Created November 30, 2011 19:59
Show Gist options
  • Save adrienjoly/1410550 to your computer and use it in GitHub Desktop.
Save adrienjoly/1410550 to your computer and use it in GitHub Desktop.
create a script that checks out the current GIT revision (e.g. before pulling / switching to another)
#!/bin/bash
echo "git checkout `git rev-parse HEAD` ." >rollback.sh
chmod +x rollback.sh
echo "rollback script saved in rollback.sh:"
cat rollback.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment