Skip to content

Instantly share code, notes, and snippets.

@heberop
Forked from giggio/_latest.md
Last active September 12, 2016 15:13
Show Gist options
  • Save heberop/2135906c3e55558d76a3 to your computer and use it in GitHub Desktop.
Save heberop/2135906c3e55558d76a3 to your computer and use it in GitHub Desktop.
My .gitconfig on Windows
[user]
name = Heber Ortiz Pereira
email = heber.pereira@lambda3.com.br
[credential]
modalprompt = true
helper = manager
[color]
diff = always
interactive = always
status = always
branch = always
[alias]
st = status
ci = commit
co = checkout
br = branch
fixup = commit --all --amend --no-edit
un = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH
pend=!GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git log ..origin/$GIT_CURRENT_BRANCH
# http://haacked.com/archive/2014/07/28/github-flow-aliases/
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m "WIP"
undo = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
prev = "!sh -c 'git checkout HEAD^1 | git clean -fd'"
next = "!sh -c 'git log --reverse --pretty=%H master | awk \"/$(git rev-parse HEAD)/{getline;print}\" | xargs git checkout'" | git clean -fd
first = "!sh -c 'git checkout tags/start | git clean -fd'"
[push]
default = simple
[log]
decorate = full
abbrevCommit = true
[format]
pretty=format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset
[gui]
gcwarning = false
[core]
autocrlf = true
editor = 'C:\\Program Files (x86)\\Microsoft VS Code\\code.exe' -w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment