Skip to content

Instantly share code, notes, and snippets.

@webkonstantin
Last active December 16, 2015 10:39

Revisions

  1. webkonstantin revised this gist Dec 16, 2015. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions post-receive
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,6 @@

    set -e

    # include dotfile in * glob
    shopt -s dotglob

    # move to working tree dir
    export GIT_DIR=$(cd ${GIT_DIR}; pwd)
    GIT_WORK_TREE="${GIT_DIR}/.."
  2. webkonstantin created this gist Dec 16, 2015.
    20 changes: 20 additions & 0 deletions post-receive
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/bin/bash

    set -e

    # include dotfile in * glob
    shopt -s dotglob

    # move to working tree dir
    export GIT_DIR=$(cd ${GIT_DIR}; pwd)
    GIT_WORK_TREE="${GIT_DIR}/.."

    # update working dir
    (
    cd ${GIT_WORK_TREE}
    pwd
    git diff-index -R --name-status HEAD >&2
    git reset --hard HEAD

    # composer install
    )