Created fail_if_not_git_repo function and prepended it to all git functions
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
# Adds numbered shortcuts to output of ls -l, just like 'git status'
|
||||
unalias $git_branch_alias > /dev/null 2>&1; unset -f $git_branch_alias > /dev/null 2>&1
|
||||
function _scmb_git_branch_shortcuts {
|
||||
fail_if_not_git_repo || return 1
|
||||
# Fall back to normal git branch, if any unknown args given
|
||||
if [[ -n "$@" ]] && [[ "$@" != "-a" ]]; then
|
||||
$_git_cmd branch "$@"
|
||||
|
||||
Reference in New Issue
Block a user