From b1304f2d353bc0de780f4d635fc9cbd48328bfcb Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 16 Oct 2011 12:18:50 -0700 Subject: [PATCH] if RECLONE is set, reclone the directories --- stack.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stack.sh b/stack.sh index a7eacbf..7334232 100755 --- a/stack.sh +++ b/stack.sh @@ -297,6 +297,12 @@ function git_clone { cd $2 # This checkout syntax works for both branches and tags git checkout $3 + elif [[ "$RECLONE" == "yes" ]]; then + cd $2 + git remote set-url origin $1 + git fetch origin + git branch -D $3 + git checkout $3 fi }