Skip to content

Instantly share code, notes, and snippets.

@sudara
Forked from toolmantim/deploy
Created April 8, 2010 10:32
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 sudara/359968 to your computer and use it in GitHub Desktop.
Save sudara/359968 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Simple deployment script
#
# Requires access to to github repository, as well as a host defined in
# ~/.ssh/config like so:
#
# Host myhost
# User appuser
# Hostname hostname
# ForwardAgent yes
#
# On a Mac you might need to run 'ssh-add' at least once beforehand.
ssh myhost 'cd ~/app; git fetch; git reset --hard origin/master'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment