-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
35 lines (34 loc) · 1.2 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
#~/.gitconfig
[user]
name = Christian Fasnacht
email = [email protected]
[alias]
ci = commit
st = status
df = diff
dfc = diff --cached
# git log pretty
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# git log pretty full hash
lgh = log --color --graph --pretty=format:'%Cred%H%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# git log pretty + iso date format
lgd = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit
# list file that were modified in a commit
filesmodif = diff-tree --no-commit-id --name-only -r
# clean up history, remove unused, old objects...
mycleanup = git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"
[color]
#git colors in shell
ui = true
[core]
editor = vim
autocrlf = input
[push]
default = simple
[diff]
tool = diff
[credential]
# cache login for 100 min
helper = cache --timeout=600
#[credential "https://git.example.com"]
# username = myuser