Skip to content

Instantly share code, notes, and snippets.

@shadyvb
Created September 26, 2014 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadyvb/9db462f00b64ea48e25c to your computer and use it in GitHub Desktop.
Save shadyvb/9db462f00b64ea48e25c to your computer and use it in GitHub Desktop.
git preview
[alias]
preview ="!f() { git branch -D preview; git fetch; git checkout preview; git merge -; git push; /path/to/wp-vip-preview/bin/deploy-preview.sh > /dev/null 2>&1; git checkout -; }; f"
@shadyvb
Copy link
Author

shadyvb commented Sep 26, 2014

Usage:
git preview

Add to ~/.gitconfig

Make sure you edit /path/to/wp-vip-preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment