-
Notifications
You must be signed in to change notification settings - Fork 4
/
gitconfig
74 lines (73 loc) · 2.69 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
[user]
name = Lukas Waymann
email = git@meribold.org
[core]
editor = vim
excludesfile = ~/.gitignore
autocrlf = false
pager = diff-so-fancy | less --tabs=4 -RFX
[commit]
status = false
[diff]
algorithm = histogram
[merge]
; I used `vimdiff` and `nvim -d` before, but Vim is rubbish at 3-way diffs. Meld
; doesn't seem too bad. TODO: Could we make Vim work acceptably well somehow?
; Maybe see <https://vim.fandom.com/wiki/A_better_Vimdiff_Git_mergetool> and
; <https://youtu.be/Pxgl3Wtf78Y>.
tool = meld
[pull]
ff = only
[push]
default = simple
[log]
follow = true
[alias]
amend = commit --amend
ci = commit --quiet
co = checkout
ff = merge --ff-only
; See <https://stackoverflow.com/a/35075021>. With recent versions of Git,
; `--decorate` is not needed (https://stackoverflow.com/a/25097285).
dog = log --decorate --oneline --graph
adog = log --all --decorate --oneline --graph
; I like `adog`, but usually I also want the date: this alias is pretty much the
; same as `adog` but also shows the relative author date.
graph = log --all --graph --format='%C(auto)%h %C(dim)%ar%C(auto)%d %s'
[credential]
; Temporarily store passwords in memory. Set before the helper that invokes
; `pass` so Git will consult the `credential-cache` helper first. The shell
; snippet using `pass` won't be invoked with the "get" operation if this helper
; succeeds (`pass` takes a second to run on my laptop). See
; git-credential-cache(1).
helper = cache --timeout=10800
[credential "https://github.com"]
username = meribold
; Ad hoc shell snippet credential helper for GitHub using [pass][1]. If $1
; (the operation to perform) is "get", obtain the GitHub password from `pass`
; (possibly causing gpg-agent to request the passphrase for unlocking the private
; key) and print a key-value pair with the password. Otherwise, if the operation
; is "store" or "erase", do nothing successfully: "[i]f [the helper] does not
; support the requested operation (e.g., a read-only store), it should silently
; ignore the request" [2]. Add `echo $1 >&2` to see what operations are
; requested.
;
; See gitcredentials(7), git-credential(1), [2], and git-config(1).
;
; [1]: https://www.passwordstore.org
; [2]: https://kernel.org/pub/software/scm/git/docs/technical/api-credentials.html
helper = !"f() { \
[[ $1 != get ]] && return 0; \
printf 'password='; pass show github/pat | head -1; \
}; f"
[credential "https://gitlab.com"]
username = meribold
; See above.
helper = !"f() { \
[[ $1 != get ]] && return 0; \
printf 'password='; pass show gitlab | head -1; \
}; f"
[annex]
autocommit = false
resolvemerge = false
; vim: ft=gitconfig