-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
125 lines (113 loc) · 6.15 KB
/
.gitconfig
File metadata and controls
125 lines (113 loc) · 6.15 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
# see http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
[alias]
au = add --update
ss = status --short
st = status
ci = commit
br = branch
co = checkout
df = diff --word-diff
bi = bisect
# -s, --no-messages suppress error messages
who = shortlog --no-messages --
undo = reset --hard
lg-20 = log -20 --color --pretty=format:'%Cred%h%Creset%C(white) %ad%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --date=short
lg-all-20 = log --graph -20 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-30 = log -30 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-30 = log --graph -30 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-40 = log -40 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-40 = log --graph -40 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-50 = log -50 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-50 = log --graph -50 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-60 = log -60 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-60 = log --graph -60 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-70 = log -70 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-70 = log --graph -70 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-80 = log -80 --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
lg-all-80 = log --graph -80 --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
# lg-20 = log --graph -20 --color --oneline --graph --pickaxe-all --decorate --stat -G 'master' # see https://zwischenzugs.com/2018/03/26/git-log-the-good-parts/
lg = log --color --pretty=format:'%Cred%h%Creset%C(white) %ad%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --date=short
lg-all = log --graph --full-history --color --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
alg = log --graph --abbrev-commit --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --
lg1 = log --graph --abbrev-commit --decorate --date=relative --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2 = log --graph --abbrev-commit --decorate --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
# Read, modify and delete symbolic refs
cb = symbolic-ref HEAD --short
# show branches
sb = !ls .git/refs/remotes/*/$(git cb) | cut -d/ -f4,5 | xargs git show-branch $(git cb)
# text-mode interface for Git
tig = !tig
# files modified in last commit
dl = "!git log --patch -1"
# show files modified in last commit - another
# dlc = diff --cached HEAD^
# find-file; --ignore-case -i
ff = "!git ls-files | grep --ignore-case"
sl = stash list
ss = stash save
sp = stash pop
# ! is needed to pass argument correctly to -S
fsc = "!git log --color --patch -S " # find-string in the content of commits
fsm = "!git log --grep " # find-string in commit messages
[user]
name = Rostislav Svoboda
email = Rostislav.Svoboda@posteo.net
# The secret key is not in git's configs but in the GnuPG's "keyring".
# The signingkey value only instructs gpg which secret key to select.
# https://stackoverflow.com/a/48067999
# gpg --list-public-keys $personName
signingkey = A2FED89D9A10000E5BF63B37612D36368877DC81
# gpg --keyid-format=long
# signingkey = 612D36368877DC81
# gpg --keyid-format=short
# signingkey = 8877DC81
# [user.bad]
# name = Bad Guy
# email = attacker@domain.com
# signingkey = A74061D56CFE8E89
[color]
ui = auto
[push]
default = simple
autoSetupRemote = true
[github]
user = Bost
[diff]
indentHeuristic = true
[rebase]
autostash = true
[core]
editor = vim
[sendemail]
smtpserver = posteo.de
# smtpserver = smtp.googlemail.com
smtpencryption = tls
smtpserverport = 587
smtpuser = Rostislav.Svoboda@posteo.net
# smtpuser = Rostislav.Svoboda@gmail.com
[commit]
gpgsign = true
[merge]
tool = meld
[mergetool "meld"]
path = /home/bost/.guix-profile/bin/meld
[mergetool]
prompt = false
# reconcile strategy for `git pull`
[pull]
rebase = true
# Using 'master' as the name for the initial branch. This default branch name
# will change to "main" in Git 3.0. To configure the initial branch name
# to use in all of your new repositories, which will suppress this warning,
# call:
#
# git config --global init.defaultBranch <name>
#
# Names commonly chosen instead of 'master' are 'main', 'trunk' and
# 'development'. The just-created branch can be renamed via this command:
#
# git branch -m <name>
#
# Disable this message with "git config set advice.defaultBranchName false"
[init]
defaultBranch = master