From: Nicolas Boisselier Date: Sat, 21 Oct 2017 02:08:36 +0000 (+0100) Subject: etc/profile.d/git.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=30c74e38aecac2e2f6dfbccb6f9fef25b78f722b;p=nb.git etc/profile.d/git.sh --- diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index 201181b4..94650195 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -184,3 +184,7 @@ git_merge_to() { [ -z "$branch" ] && echo "$usage" 1>&2 && return 1 eval "git checkout $to && git pull && git merge $branch && git push && git checkout $branch" } + +git_create_branch() { + git checkout -b "$1" && git push --set-upstream origin "$1" +}