-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgitconfig
74 lines (70 loc) · 2.09 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[core]
quotepath = false
excludesfile = ~/.gitignore
editor = vim
pager = less -r
[alias]
s = status
a = !git add . && git status
au = !git add -u . && git status
aa = !git add . && git add -u . && git status
l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
ll = log --stat --abbrev-commit
br = branch
co = checkout
chp = cherry-pick
master = checkout master
main = checkout main
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort
g = grep --break --heading --line-number
tidy = "!git branch --merged | grep -v '\\*\\|master\\|develop\\|main' | xargs -n 1 git branch -d"
prune = remote prune origin
pf = push --force-with-lease
dc = diff --cached
wip = !git add . && git commit -m "WIP"
amend = commit --amend --no-edit
unstage = restore --staged
# https://spin.atomicobject.com/fuzzy-find-git-add/
fza = "!git ls-files -m -o --exclude-standard | fzf --print0 -m | xargs -0 -t -o git add"
# branch commands from https://gist.github.com/robmiller/6018582
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
# Delete the remote version of the current branch
unpublish = "!git push origin :$(git branch-name)"
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[include]
path = .gitconfig.local
[commit]
template = ~/.gitmessage
verbose = true
[grep]
extendRegexp = true
lineNumber = true
[push]
default = simple
autoSetupRemote = true
[init]
templatedir = ~/.git_template
defaultBranch = main
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[user]
email = [email protected]
name = Mike Vormwald
[pull]
ff = only
[help]
autocorrect = prompt
[color]
ui = auto
[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential