aboutsummaryrefslogtreecommitdiffstats
path: root/dgbuilder/git_scripts/gitcheckout
blob: ca01dd79622de09d6cdc3bf310da1efec0b83dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if [ "$#" != "2" ]
then
	echo "Usage $0 gitLocalRepositoryDir branch"
	exit
fi
branch=$2
localGitRepository=$1
cd $localGitRepository
if [ -e "$localGitRepository" ]
then
	git checkout $branch
	echo
	echo -n  "Now on Branch:"
	git rev-parse --abbrev-ref HEAD
else
	echo Git Local repository not set
fi