add gren script
This commit is contained in:
parent
a8b652ce6b
commit
decbbf9b6e
1 changed files with 16 additions and 0 deletions
16
bin/gren
Executable file
16
bin/gren
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/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
|
||||
git checkout -b $1 master
|
||||
git push -u origin $1
|
||||
fi
|
Loading…
Reference in a new issue