Skip to content

Instantly share code, notes, and snippets.

@blake41
Created April 5, 2017 17:05
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 blake41/5acb711e2dbce2fc13df03b90583a0d7 to your computer and use it in GitHub Desktop.
Save blake41/5acb711e2dbce2fc13df03b90583a0d7 to your computer and use it in GitHub Desktop.
sudo stop admittedly-www
# Unset GIT_DIR or the universe will implode
unset GIT_DIR
# Change directory to the working tree; exit on failure
cd `git config --get core.worktree` || exit
# Force checkout
git checkout --force
git clean -fx
# Force update submodules
git submodule update --init --recursive --force
cd /var/www/admittedly-www
npm run deploy
sudo start admittedly-www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment