-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
53 lines (53 loc) · 2.71 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[user]
name = Sarah Vessels
email = [email protected]
[fetch]
prune = true
[github]
user = cheshire137
[push]
default = current
[alias]
co = checkout
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lg1 = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg2"
#lag = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%= '<%' %>an<%= '>' %>%Creset' --abbrev-commit --
# see all of your local branches with their last updated dates
branchdate = !git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads
recentbranches = !git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads | grep --invert-match 'months' | grep --invert-match 'year' | grep --invert-match '[56789] weeks ago'
branchname = !git rev-parse --abbrev-ref HEAD
# deletes local branches that have been merged to the default branch of the repo
# cleanup = !git branch --merged $(git branch -rl '*/HEAD' | awk -F/ '{print $NF}') | grep -v "$(git branch -rl '*/HEAD' | awk -F/ '{print $NF}')\$" | xargs git branch -d
# deletes local branches that have been merged to master
cleanup = !git branch --merged master | egrep -v '\\s+master$' | xargs git branch -d
# deletes local branches that have been merged to main
cleanupmain = !git branch --merged main | egrep -v '\\s+main$' | xargs git branch -d
updatefrommaster = !git pull && git checkout master && git pull && git checkout - && git merge master
switchto = !sh -c 'git checkout $1 && git pull' -
coi = !git branch $@ | cut -c 3- | fzf --reverse --preview 'git log --patch --color {}...{}~5' | xargs git checkout
cp = cherry-pick
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[core]
editor = vim
autocrlf = input
excludesfile = ~/.gitignore_global
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[filter "lfs"]
process = git-lfs filter-process
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[init]
defaultBranch = main