This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
80 lines (72 loc) · 2.45 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
80
[user]
# Set my name, but require me to set the email address manually for each
# repo. This should hopefully solve the cases where I’m committing (and
# pushing) from the wrong address for days.
# See <https://github.com/scy/dotfiles/issues/9> for rationale.
name = Tim Weber
useConfigOnly = true
signingKey = 144FEA6B3FF0F6EFD035963B38ACA93052B3EB9A
[init]
# Name the default branch "main", not "master". #BlackLivesMatter
defaultBranch = main
[interactive]
singlekey = true
[alias]
a = add
al = aliases # not a Git builtin; `aliases` is my `bin/git-alias`.
ap = add --patch
c = commit
ca = commit --all
cam = commit --amend
caam = commit --all --amend
cl = clone --recurse-submodules
co = checkout
cob = checkout -b
cop = checkout --patch
cS = commit --no-gpg-sign
d = diff
ds = diff --staged
f = fetch
ig = edit-ignore # not a Git builtin either
l = log
lp = log --patch
ls = log --stat
p = push
rb = rebase
rbc = rebase --continue
rbi = rebase --interactive
s = status
# Needs to be a shell alias (!git) in order to expand $HOME :(
sshpushes = !git config --file $HOME/.gitconfig-local url.ssh://github.com/.pushInsteadOf https://github.com/
st = stash
stp = stash pop
u = pull
ur = pull --rebase --autostash
# Disable commit signing for a single repository.
nosign = config commit.gpgSign false
# Email addresses (private and business).
scy = config user.email scy@scy.name
tw = config user.email mail@timweber.name
[pull]
# `git pull` should use `rebase` instead of doing a merge commit.
# This only makes sense if nobody else is working on top of your history
# before you've pushed it to the same repo you're pulling from.
# `rebase = merges` would probably be an even better setting, but requires
# Git ≥ 2.18, which is too new for Debian stretch. ¯\_(ツ)_/¯
rebase = preserve
[credential]
# Store HTTPS credentials unencrypted on disk, only protected by file system
# permissions. The rationale is: All disks I use to access private Git repos
# or to push somewhere should be encrypted anyway, and if the machine is
# compromised, all hope is lost anyway. This is the simplest and most cross-
# platform solution.
helper = store
[commit]
# By default, sign all of my commits with GnuPG.
gpgSign = true
# When pushing to Codeberg, use SSH instead of HTTPS.
[url "ssh://git@codeberg.org/"]
pushInsteadOf = https://codeberg.org/
[include]
# Use an additional, host-specific Git config (if it exists).
path = ~/.gitconfig-local