Skip to content

Instantly share code, notes, and snippets.

@mattd
Created October 6, 2011 21:23
Show Gist options
  • Save mattd/1268719 to your computer and use it in GitHub Desktop.
Save mattd/1268719 to your computer and use it in GitHub Desktop.
#!/bin/bash
unset GIT_DIR
cd /home/<username>/public_html/scripts
git checkout <branchname>
git stash
git reset --hard HEAD
git pull origin <branchname>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment