Summary Files Commits Branches @commit @diff @stats
path: root / scripts / checkout
blob: 26a36b0be118e90bf7a403737f675bf933e7039f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

if [ -z "$1" ]
then
	printf 'Repository: '
	read
	set "$REPLY"
fi

if [ -z "$2" ]
then
	printf 'Branch    : '
	read
	set "$1" "$REPLY"
fi

cd "$1" && \
git symbolic-ref HEAD refs/heads/"$2"