From 89b3981cea63396a0a830d74960a68ce68238539 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 24 Oct 2017 00:11:58 +0100 Subject: [PATCH] etc/profile.d/git.sh --- etc/profile.d/git.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index 94650195..a5958fa3 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -3,6 +3,8 @@ # [ -z "$GIT_REPO" ] && GIT_REPO='git@git.nbdom.net' which git > /dev/null || return 0 +# NB 24.10.17: TODEL +unset -f git_create_branch 2>&1 | true alias git_grep="git grep --color=auto" alias git_ls_tree="git ls-tree --full-tree -r HEAD" @@ -178,13 +180,13 @@ git_merge_from() { } git_merge_to() { - local usage="Usage: git_merge_to BRANCH and auto push branch to !" + local usage="Usage: git_merge_to BRANCH, and push branch !" local to=${1:?$usage} local branch=$(git branch 2>/dev/null|awk '/^\*/{print $2}') [ -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_branch_create_push() { git checkout -b "$1" && git push --set-upstream origin "$1" } -- 2.47.3