Skip to content

Instantly share code, notes, and snippets.

@h3h h3h/.gitconfig

Created Jun 8, 2011
What would you like to do?
My global .gitconfig
name = Brad Fults
email =
amend = commit --amend
co = checkout
st = status
cp = cherry-pick
# edit config (global, local)
ec = !vim ~/.gitconfig
ecl = !vim .git/config
# log graph
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# rebase interactive (local commits on master)
rbi = rebase -i origin/master
# edit conflicted files
ecf = !$EDITOR $(git ls-conflicted-files)
ls-conflicted-files = ls-files --unmerged
human = name-rev --name-only --refs=refs/heads/*
status = auto
[color "status"]
added = green
changed = cyan
untracked = yellow
autosetupmerge = true
autosetuprebase = always
requireForce = false
default = tracking
user = h3h
token = ...
autocorrect = 1
enabled = 1
autocrlf = input
export GIT_EDITOR="/usr/bin/mate -w"
function gcb()
git branch | grep '^\*' | cut -c3-
function gbp()
git fetch && git rebase origin/`gcb`
function gpu()
git push origin `gcb`
alias ga="git add"
alias gaa="git add ."
alias gf="git fetch"
alias gp="git pull"
alias gst="git status -s"
alias gbr="git branch $@"
alias gdi="git diff $@ | mate"
alias gdic="git diff --cached | mate"
alias gsl="git stash list"
alias gsa="git stash pop"
alias gcl="git clean | grep -v 'Not removing'"
alias gg="git commit -v"
alias gpr="git pull --rebase"
alias gk="gitk --all &"
alias gx="gitx"
alias gpp="gp && gpu"
for branch in `git branch | cut -c 3-`; do
git co $branch && git pull;
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.