Chinthakayala, Sheshashailavas (sc2914) | d156997 | 2017-08-28 05:25:46 -0900 | [diff] [blame] | 1 | if [ "$#" != "2" ] |
2 | then | ||||
3 | echo "Usage $0 gitLocalRepositoryDir branch" | ||||
4 | exit | ||||
5 | fi | ||||
6 | branch=$2 | ||||
7 | localGitRepository=$1 | ||||
8 | cd $localGitRepository | ||||
9 | if [ -e "$localGitRepository" ] | ||||
10 | then | ||||
11 | git checkout $branch | ||||
12 | echo | ||||
13 | echo -n "Now on Branch:" | ||||
14 | git rev-parse --abbrev-ref HEAD | ||||
15 | else | ||||
16 | echo Git Local repository not set | ||||
17 | fi |