Skip to content

Commit

Permalink
Merge pull request #1499 from jmthvt/feature/unalias-gh
Browse files Browse the repository at this point in the history
Check gh command exists before setting git gh alias
  • Loading branch information
nwinkler authored Apr 27, 2020
2 parents bae6bbf + 91a96a4 commit a31f4f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit a31f4f0

Please sign in to comment.