-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
48 lines (43 loc) · 1.78 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
# This is Git's per-user configuration file.
[user]
name = Scott Kruger
email = [email protected]
[push]
default = simple
[pull]
rebase = true
[alias]
co = checkout
# Various unfuckery methods
discard = reset HEAD --hard
uncommit = reset --soft HEAD^
unstage = reset HEAD --
discardchunk = checkout -p
others = "ls-files --others --ignored --exclude-from=.gitignore"
root = rev-parse --show-toplevel
s = status
searchfiles = "log --name-status --source --all -S"
searchtext = "!f() { git grep \"$*\" $(git rev-list --all); }; f"
#review for code reviews against the upstream master branch. (Note the ... rather than ...) (Assumes main)
review = "!f() { git log -p --reverse \"$@\" origin/main...HEAD; }; f"
#Since git bash completion autocomplets on aliases, a lot of these are just showing the most useful arguments
#start with automating squashing
commit-amend = "commit --amend"
commit-fixup = "commit --fixup"
rebase-squash = "rebase -i --autosquash"
log-graph = "log --graph --decorate --abbrev-commit --pretty=oneline"
log-graphall = "log --graph --decorate --pretty=oneline --abbrev-commit --all"
log-allfiles = "!f() { git log --name-only --diff-filter=A --pretty=format: | sort -u; }; f"
log-other = "log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
config-list = config --list
diff-changedfiles = "diff-tree --no-commit-id -r --name-only"
[delta]
plus-style = "syntax #012800"
minus-style = "syntax #340001"
syntax-theme = Monokai Extended
navigate = true
side-by-side = true
line-numbers-left-format = ""
line-numbers-right-format = "│ "
[interactive]
diffFilter = delta --color-only