-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
65 lines (47 loc) · 1.51 KB
/
gitconfig
File metadata and controls
65 lines (47 loc) · 1.51 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
# Some ideas in here were cribbed from or inspired by this article:
# http://michaelwales.com/articles/make-gitconfig-work-for-you/
[user]
name = Dan Muller
email = dan.muller@dmuller.us
[github]
user = dwmuller
[url "git@github.com:"]
insteadOf = gh:
[url "https://gitlab.com/"]
insteadOf = gl:
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = red
[alias]
# Show all of my configured aliases
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t\\2/' | sort
# Show the current branch name (handy for shell prompts).
brname = !git branch | grep "^*" | awk '{ print $2 }'
# For when you made that commit a bit too early: Amend
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
# View a pretty git log with branch tree
g = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# Compact commit log, esp. handy for squashing commits.
slog = log --graph --all --topo-order --pretty='format:%h %ai %s%d (%an)'
[includeIf "gitdir/i:~/ctma/"]
path = ~/.dotfiles/ctma/ctma.gitconfig
[includeIf "gitdir/i:mers/"]
path = ~/.dotfiles/mers/mers.gitconfig
[diff]
tool = code
[difftool "code"]
cmd = code --wait --diff "$LOCAL" "$REMOTE"
[init]
defaultBranch = main