summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@mail.bitbase.dk>2008-11-03 22:18:33 +0100
committerroot <root@mail.bitbase.dk>2008-11-03 22:18:33 +0100
commit4bded288860ac055c0aa6350a7382d854ef01959 (patch)
tree1d67ea9393c954377fd13ece55a1e84c31a3bfcc
parent502eb729b6f5e45d18b8573682589c85879177c5 (diff)
Fix branch option (do git checkout in workingdir).
-rwxr-xr-xlocalikiwikicreatesite3
1 files changed, 2 insertions, 1 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite
index c75d0d9..54a212f 100755
--- a/localikiwikicreatesite
+++ b/localikiwikicreatesite
@@ -253,7 +253,8 @@ if [ -n "$origin" ]; then
git_setenv_work "$CFGDIR"
if [ -n "$branch" ]; then
git branch -f "$branch" "origin/$branch"
- git checkout "$branch"
+ # git checkout ignores GIT_DIR and GIT_WORKING_TREE
+ ( cd "$CFGDIR" && git checkout "$branch" )
fi
git config remote.origin.url "$DESTSRCDIR/$project.git"
git push --all