Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Git alias for .bash_profile
# ----------------------
# Git Aliases
# ----------------------
alias g='git'
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
function_exists() {
declare -f -F $1 > /dev/null
return $?
for al in `__git_aliases`; do
alias g$al="git $al"
complete_func=_git_$(__git_aliased_command $al)
function_exists $complete_fnc && __git_complete g$al $complete_func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.