]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 21 Oct 2017 02:08:36 +0000 (03:08 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 21 Oct 2017 02:08:36 +0000 (03:08 +0100)
etc/profile.d/git.sh

index 201181b4ff31eac2a90ee64b497821c5d69ae48f..946501954d81114a83b4c68f76b99f17fcf8af66 100644 (file)
@@ -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"
+}