Created
April 23, 2021 23:56
-
-
Save declanshanaghy/12498abe4730c0ec0db30b8fec9bbace to your computer and use it in GitHub Desktop.
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 = Declan Shanaghy | |
email = [email protected] | |
[pager] | |
branch = false | |
[alias] | |
# list configured aliases | |
la = "!git config -l | grep alias | cut -c 7-" | |
br = branch | |
c = commit --verbose | |
ca = commit -a --verbose | |
co = checkout | |
cob = checkout -b | |
p = push | |
pu = "!git push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\"" | |
rim = rebase -i master | |
s = status | |
# one-line log | |
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
# list branches sorted by last modified | |
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" | |
amend = commit --amend | |
force = push --force | |
unstage = reset HEAD -- | |
reset-hard = reset --hard HEAD | |
# Multi stage commands | |
get = !git checkout master && git fetch --tags && git pull origin master | |
get-rewritten = "!f() { git checkout master && git branch -D $1; git fetch && git checkout $1; }; f" | |
# The cribl clone | |
cribl = "!f() { git clone [email protected]:cribl/$1.git; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment