-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
39 lines (34 loc) · 1.02 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
[user]
name = Furkan Karakoyunlu
username = spootrick
email = myoiatr@gmail.com
[core]
editor = vim
[color]
ui = auto
[alias]
# if there is ! at the beginning, git treats it as a bash command.
hello = "!echo \"Hello world!\""
# one-line log with date
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
# list commits showing changed files
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# list one line commits with relative dates
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
# show file log
fl = log -u
# log tree
logtree = log --graph --oneline --decorate --all
# diff
dr = "!f() { git diff "$1"^.."$1"; }; f"
lc = "!f() { git ll "$1"^.."$1"; }; f"
diffr = "!f() { git diff "$1"^.."$1"; }; f"
a = add
br = branch
co = checkout
cb = checkout -b
cm = commit -m
cl = clone
st = status
# list aliases
la = "!git config -l | grep alias | cut -c 7-"