Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
My Git related config and aliases


This gist is now deprecated as I've finally sorted out and made my dotfiles public.

My ~/.gitconfig is available here, and my git-related shell setup here.

status = auto
branch = auto
diff = auto
a = add
ai = add -i
p = pull --rebase
pu = push
co = checkout
br = branch
ci = commit
st = status
me = merge
di = diff
sub = submodule
unstage = reset HEAD --
last = log -1 HEAD
fi = flow init
fs = flow feature start
ff = flow feature finish
rs = flow release start
rf = flow release finish
hs = flow hotfix start
hf = flow hotfix finish
ss = flow support start
sf = flow support finish
whitespace = nowarn
# Git Aliases
alias g="git"
alias gi="git"
alias ga="git add"
alias gs="git status"
alias gai="git add -i"
alias gp="git push"
alias gf="git fetch"
alias gd="git difftool"
alias gpl="git pull --rebase"
alias gif="git flow"
alias gix="gitx"
alias gx="gitx"
# Git Completion (for use when git is installed with Homebrew)
source "/usr/local/etc/bash_completion.d/git-completion.bash"
source "/usr/local/etc/bash_completion.d/git-flow-completion.bash"
complete -o default -o nospace -F _git g
complete -o default -o nospace -F _git gi

This comment has been minimized.

Copy link

@leotsem leotsem commented May 6, 2011

a new suggestion:

ac = !git add -A && git commit

so you can:

git ac -m "add all new changes including new files and commit in one line"

This comment has been minimized.

Copy link
Owner Author

@jimeh jimeh commented May 6, 2011

Seems neat, although I can't say I've ever committed everything like that. I tend to hand-pick all my changes with GitX or git add -i :)

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.