Merge pull request #1499 from jmthvt/feature/unalias-gh

Check gh command exists before setting git gh alias
pull/1575/head
Nils Winkler 2020-04-27 08:40:57 +02:00 committed by GitHub
commit a31f4f0be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -103,7 +103,11 @@ alias gsw="git switch"
alias gswm="git switch master"
alias gswc="git switch --create"
alias gswt="git switch --track"
alias gh='cd "$(git rev-parse --show-toplevel)"'
# Git home
alias ghm='cd "$(git rev-parse --show-toplevel)"'
if ! _command_exists gh; then
alias gh='ghm'
fi
# Show untracked files
alias gu='git ls-files . --exclude-standard --others'