Last active
March 10, 2016 11:29
-
-
Save Raphhh/c1010bfbf0d1c33d69d2 to your computer and use it in GitHub Desktop.
.gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Raphaël Lefebvre | |
email = [email protected] | |
[core] | |
excludesfile = c:/Users/Raphaël/.gitignore_global | |
autocrlf = input | |
[ui] | |
color = auto | |
[grep] | |
extendedRegexp = true | |
[log] | |
abbrevCommit = true | |
[fetch] | |
prune = true | |
[merge] | |
ff = false | |
conflictStyle = diff3 | |
tool = vimdiff | |
[mergetool] | |
keepBackup = false | |
keepTemporaries = false | |
prompt = false | |
[rebase] | |
autosquash = true #can use automatically squash! and fixup! | |
[rerere] | |
enabled = true | |
autoupdate = true | |
[pull] | |
rebase = preserve #preserve the merges | |
[push] | |
default = upstream | |
[alias] | |
pl = pull --rebase | |
st = status | |
ci = commit | |
ca = commit -a | |
cam = commit -am | |
co = checkout | |
lg = !sh -c 'git --no-pager log --graph --pretty=\"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an %cr)%Creset\" $*' - | |
df = diff --name-status | |
ps = push | |
aa = add . -up | |
fixup = !sh -c 'git commit --fixup=$1' - | |
squash = !sh -c 'git commit --squash=$1' - | |
ri = rebase --interactive | |
ria = rebase --interactive --autosquash | |
files = diff-tree --no-commit-id --name-status -r | |
sco = !sh -c 'git stash && git co $1 && git stash pop' #smart checkout: when you want to switch to another branch with your stage which could be overwritten by checkout | |
spu = !sh -c 'git stash && git pull --rebase && git stash pop' #smart pull: allows to pull even when working tree is dirty | |
refresh = !sh -c 'git co $2 && git fetch origin && git rebase origin/$1' - | |
publish = !sh -c 'git co $1 && git fetch origin && git reset --hard origin/$1 && git merge --no-ff -m \"Merge $2 into $1\" origin/$2' - | |
explain = !sh -c 'git --no-pager show --format=full --quiet $1 && echo && echo Impacted files: && git --no-pager diff --name-status $1 $1^ && echo && echo Contained in branches: && git --no-pager branch -r --contains $1' - | |
clear = !sh -c 'git co $1 && git fetch origin && git reset --hard origin/$1' - | |
debug = !sh -c 'git bisect start && git bisect good $2 && git bisect bad HEAD && git bisect run bin/$1 && git bisect reset' - | |
sparadrap = !sh -c 'git add . -u && git commit --amend --no-edit' - | |
cleanbranches = !sh -c 'git branch --merged | grep -v \"\\*\" | xargs -n 1 git branch -d' - | |
aliases = config --get-regexp alias |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment