Last active
May 14, 2024 08:23
-
-
Save kino90/3cc0e80c8072477a9f96c33782b1d547 to your computer and use it in GitHub Desktop.
Git configuration file with useful alias
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
[core] | |
autocrlf = input | |
ignorecase = false | |
[user] | |
name = YourName | |
email = [email protected] | |
[alias] | |
# flow | |
ffs = flow feature start | |
# fetch | |
f = fetch | |
fp = fetch --prune | |
prugne = fetch --prune # meme | |
prune = fetch --prune | |
# status | |
st = status | |
s = status -sb | |
sb = status -sb | |
# checkout | |
co = checkout | |
cob = checkout -b | |
# add | |
a = add | |
ap = add -p | |
# diff | |
d = diff | |
ds = diff --stat | |
dc = diff --cached | |
# commit | |
c = commit --verbose | |
ca = commit -a --verbose | |
cm = commit -m | |
cam = commit -a -m | |
m = commit --amend --verbose | |
# reset | |
r = reset | |
rh = reset --hard | |
# 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/--'" | |
# list aliases | |
la = "!git config -l | grep alias | cut -c 7-" | |
# logging | |
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment