From: Nicolas Boisselier Date: Tue, 6 Dec 2016 17:35:33 +0000 (+0000) Subject: git X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=f0b621b98b915c8b457252131460718c098db984;p=nb.git git --- diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index d3f5142d..e15041f9 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -9,8 +9,10 @@ alias git_ls_tree="git ls-tree --full-tree -r HEAD" alias git_ls_files="git ls-files" git_pull_reset() { + local branch='origin/master' + [ -n "$1" ] && branch="$1" git fetch --all - git reset --hard origin/master + git reset --hard $branch } git_log_files() {