Skip to content

Instantly share code, notes, and snippets.

@jimeh
Created November 16, 2009 00:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jimeh/235596 to your computer and use it in GitHub Desktop.
Save jimeh/235596 to your computer and use it in GitHub Desktop.
My Git related config and aliases

NOTE

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.

[color]
status = auto
branch = auto
diff = auto
[alias]
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
[apply]
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
@leotsem
Copy link

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"

@jimeh
Copy link
Author

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