From 4bded288860ac055c0aa6350a7382d854ef01959 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 3 Nov 2008 22:18:33 +0100 Subject: Fix branch option (do git checkout in workingdir). --- localikiwikicreatesite | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'localikiwikicreatesite') 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 -- cgit v1.2.3