-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgitconfig
More file actions
75 lines (71 loc) · 2.26 KB
/
gitconfig
File metadata and controls
75 lines (71 loc) · 2.26 KB
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
75
[core]
quotepath = false
excludesFile = /Users/mikevormwald/.gitignore_global
editor = vim
pager = less -r
ignorefile = ~/.gitignore_global
[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
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"
br = "!git for-each-ref --sort=-committerdate --format=\"%(refname:short) %(committerdate:relative)\" refs/heads/ | head -10"
# 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 = mvormwald@gmail.com
name = Mike Vormwald
[pull]
ff = only
[help]
autocorrect = prompt
[color]
ui = auto
[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential