Skip to content

Instantly share code, notes, and snippets.

@rlaverde
Last active October 3, 2017 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlaverde/d5923a2e6db94e1c1e4c39e0e25b8cf8 to your computer and use it in GitHub Desktop.
Save rlaverde/d5923a2e6db94e1c1e4c39e0e25b8cf8 to your computer and use it in GitHub Desktop.
My git configuration 🤓
[user]
name =
email =
[core]
editor = vim
[merge]
tool = kdiff3
[alias]
unstage = reset HEAD --
last = log -1 HEAD
undo-commit = reset --soft HEAD~1
update = pull upstream master
ls = log -10 --oneline HEAD
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | grep -v " ${1-3.x}$" | grep -v " ${1-3.1.x}$" | grep -v " ${1-split-plugins}$" | xargs -r git branch -d; }; f"
a = add -p
updateall = pull upstream --all
graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
difff = diff HEAD^1
s = status
c = commit
ch = commit
ch = checkout
bnew = checkout -b
lss = log --oneline -30
dif = diff --cached
ppush = log @{push}..
r = rebase
rc = rebase --continue
ra = rebase --abort
mt = mergetool
ca = commit --amend
remote-github = "!f() { \
git remote add $1 git@github.com:$1/$2.git; \
}; f"
[push]
default = current
[color]
ui = auto
[remote]
pulldefault = upstream
pushdefault = origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment