Last active
September 23, 2021 00:47
-
-
Save dragonworx/a857eaeba125412638e6fde83277f012 to your computer and use it in GitHub Desktop.
Gitconfig aliases
This file contains hidden or 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] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
com = checkout master | |
fe = fetch origin | |
bn = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD` | |
rb = rebase | |
rbm = rebase master | |
pr = !sh -c 'BRANCH_NAME=$(git bn) && git co $0 && git fe && git merge --ff-only origin/$0 && git co $BRANCH_NAME && git rb $0' | |
pmr = !git pr master | |
df = diff | |
who = shortlog -s -- | |
hr = reset --hard | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
rbc = rebase --continue | |
mt = mergetool | |
unstage = reset HEAD $1 | |
stage = add -A | |
ff = !sh -c 'BRANCH_NAME=$(git bn) && git merge --ff-only origin/$BRANCH_NAME' | |
ls = !sh -c 'git show --pretty=format:--name-only $1' | |
files = diff-tree --no-commit-id --name-only -r HEAD | |
tree = !sh -c 'git lg | head -15' | |
what = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' | |
head = rev-parse --short HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment