-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgitconfig
More file actions
148 lines (120 loc) · 3.44 KB
/
gitconfig
File metadata and controls
148 lines (120 loc) · 3.44 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[alias]
br = branch
ci = commit
cm = commit -m
cl = clone
co = checkout
cp = cherry-pick
d = diff --word-diff=color
diff = diff --word-diff=color
dc = diff --cached
pom = "!git push origin master"
sl = stash list
sa = stash apply
ss = stash save
st = status -s
unstage = reset HEAD --
# Adds a file to .gitignore.
ignore="!f() { echo $1 >> \"${GIT_PREFIX}.gitignore\"; }; f"
# Ignores a file that's in the repository.
lock="update-index --skip-worktree"
# Stop ignoring a file that's in the repository.
unlock="update-index --no-skip-worktree"
# Show modified files in last commit.
dl = "!git ll -1"
# Show a diff of the last commit
dlc = diff --cached HEAD^
# Show a diff of specific commit
dr = "!f() { git diff "$1"^.."$1"; }; f"
# List files modified in the given commit. Defaults to current commit.
wo = "!f() { git diff-tree --no-commit-id --name-only -r "${1:-HEAD}"; }; f"
# Find a file in the codebase
f = "!git ls-files | grep -i"
#list remotes
rem="!git config -l | grep remote.*url | tail -n +2"
# Search codebase for a string
grep = grep -Ii
gr = grep -Ii
le = log --oneline --decorate
ll = log --pretty=format:"%C(yellow)%h%C(red)%d\\ %C(reset)%s%C(blue)\\ [%cn]" --decorate --stat
llp = log --pretty=format:"%C(yellow)%h%C(red)%d\\ %C(reset)%s%C(blue)\\ [%cn]" --decorate --stat -p --word-diff=color --function-context
# hash [authorDate] (branch) summary [committerName]
ls = log --pretty=format:"%C(yellow)%h\\ %C(green)[%ad]%C(red)%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
# Same as ls with no date
ls1 = log --pretty=format:"%C(yellow)%h%C(red)%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lds = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
lg = log --graph --pretty=format:"%C(yellow)%h\\ %C(green)%ad%C(red)%d\\ %C(reset)%s%C(blue)\\ [%cn]" --abbrev-commit --date=relative
lc = "!f() { git ll $1^..$1; }; f"
# Plain, no color - hash commitMessage [committerName]
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
changes = diff --name-status -r
diffstat = diff --stat -r
prune-all = !git remote | xargs -n 1 git remote prune
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
# list who has contributed to a project
who=shortlog -n -s --no-merges
# remove local and remote branches
rmb = !sh -c 'git branch -D $1 && git push origin :$1' -
up = pull --rebase upstream master
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[core]
editor = idea
excludesfile = ~/.config/git/global_gitignore
pager = delta
eol = lf
autocrlf = input
commitGraph = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
[diff]
renames = copies
algorithm = histogram
[user]
name = Joe Schafer
email = joe@jschaf.com
[push]
autoSetupRemote = true
[merge]
stat = true
conflictStyle = zdiff3
[include]
path = ~/.config/github/gitconfig
path = ~/.gitconfig-system
[url "git@github.com:jschaf/"]
insteadOf = "ghj:"
[url "https://github.com/"]
insteadOf = "gh:"
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = netrc
[pull]
rebase = true
autosquash = true
[fetch]
prune = true
[gc]
writeCommitGraph = true
[pack]
sparse = true
[init]
defaultBranch = main
[rerere]
enabled = true
[rebase]
updateRefs = true