Last active
May 28, 2018 06:51
-
-
Save shacker/d672eca3515ee950c04b4eb3cabb61df to your computer and use it in GitHub Desktop.
shacker .gitconfig aliases
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
[alias] | |
alias = config --get-regexp ^alias\\. | |
br = branch | |
bra = branch -a -v -v | |
cm = commit -a | |
co = checkout | |
cp = cherry-pick | |
dev = checkout develop | |
find = "!f() { git ls-files |grep $@; }; f" | |
last = log -1 HEAD | |
lasttag = describe --tags --abbrev=0 | |
log1 = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
log2 = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
ls = ls-files | |
r = remote -v -v | |
rem = "!git config -l | grep remote.*url | tail -n +2" | |
rev = merge --no-ff --no-commit | |
s = status | |
sb = status -sb | |
squash = merge --squash | |
sl = stash list | |
sa = stash apply | |
ss = stash save | |
tags = tag -n | |
# undo | |
r1 = reset HEAD^ | |
r2 = reset HEAD^^ | |
rh = reset --hard | |
rh1 = reset HEAD^ --hard | |
rh2 = reset HEAD^^ --hard | |
unstage = reset HEAD -- | |
# conflict/merges | |
ours = "!f() { git co --ours $@ && git add $@; }; f" | |
theirs = "!f() { git co --theirs $@ && git add $@; }; f" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment