#!/bin/sh

if [ ! -d .git/refs/heads ]
then
	echo Cannot find .git metadata, aborting.
	exit 1
fi

FN=".git/refs/heads/$1"

if [ -f $FN ]
then
	echo Branch $1 exists, moving to $1.old.
	mv -f $FN $FN.old
fi

cp .git/refs/heads/master $FN

git-switch-tree $1

