From decbbf9b6e504ef559834006029a3846b01d8278 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 9 Mar 2020 19:37:57 +0100 Subject: [PATCH] add gren script --- bin/gren | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/gren diff --git a/bin/gren b/bin/gren new file mode 100755 index 0000000..fc33c35 --- /dev/null +++ b/bin/gren @@ -0,0 +1,16 @@ +#!/bin/sh +set -ex + +if [[ -z "$1" ]]; then + echo "Usage: $0 " + 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