Created
September 5, 2014 13:16
-
-
Save generalov/b7ee9d6e2cfdb912d445 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 = Evgeny V. Generalov | |
email = [email protected] | |
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
wc = diff --staged | |
br = branch | |
who = shortlog -s -- | |
bra = branch -a | |
chp = cherry-pick | |
pr = pull --rebase | |
bl = blame -b -w | |
cia = commit --amend | |
changes=diff --name-status -r | |
diffstat=diff --stat -r | |
lg = log --graph --date=local --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit | |
bt = log --graph --simplify-by-decoration --pretty=format:'%d' --all | |
lc = log ORIG_HEAD.. --stat --no-merges | |
undo=reset --hard | |
prune-all = !git remote | xargs -n 1 git remote prune | |
fix = "!am() { curl -s http://whatthecommit.com/ | grep '<p>' | cut -c4-; }; git commit -em \"# $(am)\" \"$@\"" | |
up = !(git add . && git stash && git pull --rebase >&2) | grep -v \"No local changes to save\" && git stash pop | |
hack = "!f() { B=${1:-$(git rev-parse --abbrev-ref HEAD)}; \ | |
git fetch && \ | |
((git show-ref --quiet refs/heads/$B && git checkout $B) || git checkout -b $B) && \ | |
((git ls-remote --exit-code . origin/$B && git pull origin $B) || true) && \ | |
git merge origin/master && echo Hack on '$B'; }; f" | |
ship = !(CURRENT=`git rev-parse --abbrev-ref HEAD` && \ | |
git fetch && \ | |
git merge origin/master && \ | |
git checkout master && \ | |
git pull --rebase origin master && \ | |
git merge --ff-only ${CURRENT} && \ | |
git push origin master && \ | |
git checkout ${CURRENT} && \ | |
git push && \ | |
git hack) | |
# git in / git out — смотреть какие коммиты придут/уйдут перед выполнением pull/push | |
in = "!git remote update -p; git log ..@{u}" | |
out = log @{u}.. | |
# git unstage - убрать всё из индекса (чтобы например добавить/закоммитить сначала что-то другое) | |
unstage = reset HEAD -- | |
;graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
[branch] | |
autosetupmerge = true | |
;mergeoptions = "--no-ff" | |
[color] | |
ui = auto | |
[color "diff"] | |
whitespace = red reverse | |
[core] | |
excludesfile = /home/lucky/.gitignore | |
autocrlf = input | |
safecrlf = warn | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
[diff] | |
color = true | |
[merge] | |
log = true | |
summary = true | |
[push] | |
default = upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment