Skip to content

Instantly share code, notes, and snippets.

@shadyvb
Created September 26, 2014 16:31
Show Gist options
  • Select an option

  • Save shadyvb/9db462f00b64ea48e25c to your computer and use it in GitHub Desktop.

Select an option

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

shadyvb commented Sep 26, 2014

Copy link
Copy Markdown
Author

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