-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
79 lines (79 loc) · 2.29 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
75
76
77
78
79
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits.
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format.
s = status -s
# Show the diff between the latest commit and the current state.
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# Switch to a branch, creating it if necessary.
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# List aliases.
aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit.
amend = commit --amend --reuse-message=HEAD
# Interactive rebase with the given number of latest commits.
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Remove branches that have already been merged with main.
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# List contributors with number of commits.
contributors = shortlog --summary --numbered
# Show the user email for the current repository.
whoami = config user.email
[branch]
# Show most recently changed branches first.
sort = -committerdate
[apply]
# Detect whitespace errors when applying a patch.
whitespace = fix
[core]
# Use diff-so-fancy for diffs
pager = diff-so-fancy | less --tabs=4 -RFX
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
editor = vim
quotepath = false
excludesfile = ~/.gitignore
[include]
path = .gitconfig.local
[user]
name = João Pereira
[gpg]
program = gpg
[commit]
# Sign commits with GPG
gpgsign = true
[diff]
# Detect copies as well as renames.
renames = copies
[diff "bin"]
# Use `hexdump` to diff binary files.
textconv = hexdump -v -C
[push]
default = current
[pull]
rebase = false
[help]
# Automatically correct and execute mistyped commands.
autocorrect = 1
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[interactive]
# Use diff-so-fancy for diffs
diffFilter = diff-so-fancy --patch
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
func = 146 bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[init]
defaultBranch = main