dotfiles/bin/gren

17 lines
217 B
Text
Raw Permalink Normal View History

2020-03-09 19:37:57 +01:00
#!/bin/sh
set -ex
if [[ -z "$1" ]]; then
echo "Usage: $0 <branch name>"
exit 1
fi
hub sync
if git rev-parse --verify --quiet $1; then
git checkout $1
else
2020-11-15 14:30:52 +01:00
git checkout -b $1 main
2020-03-09 19:37:57 +01:00
git push -u origin $1
fi