summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-08-14 12:19:36 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-08-14 12:19:36 -0300
commit8c0ba8357e629cc2eaef1d551618d14ac15b6493 (patch)
tree2beb04964eb8866da0b44080ac3674bf7dafd76a /git-hooks
parent01f98e0ead7047c1574e3d353c9347db8dd70481 (diff)
Deploy current branch
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/auto-deploy8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-hooks/auto-deploy b/git-hooks/auto-deploy
index 0480756..02a22e7 100755
--- a/git-hooks/auto-deploy
+++ b/git-hooks/auto-deploy
@@ -8,9 +8,9 @@ set -e
# Can we write on the clone?
test -w "${1}/.git/HEAD"
-# pull this repo
-git --git-dir "${1}/.git" \
- --work-tree "${1}" \
- pull origin master
+alias git="git --git-dir '${1}/.git' --work-tree '${1}'"
+
+# pull this repo on the current branch
+git pull origin $(git rev-parse --abbrev-ref HEAD)
exit $?