Last active
August 4, 2021 15:44
-
-
Save mastilver/659d71579d2b10cff2c3 to your computer and use it in GitHub Desktop.
My git config
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
[push] | |
default = simple | |
[pull] | |
rebase = true | |
[fetch] | |
prune = true | |
[alias] | |
sb = status -sb | |
undo = reset --hard HEAD | |
# http://stackoverflow.com/a/9074343/3052444 | |
graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
# https://gist.github.com/gnarf/5406589#file-gitconfig-L2 | |
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" | |
# https://stackoverflow.com/a/17843908/3052444 | |
checkout-parent = "!f() { git checkout $(git show-branch | grep '\\*' | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed 's/.*\\[\\(.*\\)\\].*/\\1/' | sed 's/[\\^~].*//'); }; f" | |
[merge] | |
tool = kdiff3 | |
[mergetool] | |
keepBackup = false | |
[help] | |
autoCorrect = 1 | |
[core] | |
editor = vim | |
filemode = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment