-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_gitconfig
57 lines (50 loc) · 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[user]
name = Guangliang Zhao
email = [email protected]
[color]
ui = true
interactive = auto
diff = auto
status = auto
branch = auto
[format]
signoff = true
[apply]
whitespace = fix
[alias]
co = checkout # Checkout a branch
cob = checkout -b # Checkout a new not yet existing branch
f = fetch -p # Fetch from a repository and prune any remote-tracking references that no longer exist on the remote.
ci = commit # Commit you changes
p = push # Push you changes to a remote
b = branch
ba = branch -a # List both remote-tracking branches and local branches.
bd = branch -d # Delete a branch only if it has been merged
bD = branch -D # Force delete a branch
dc = diff --cached # Display the staged changes
ds = diff --staged
di = diff
st = status
l = log
ls = log --graph --color --stat --oneline
plog = log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'
tlog = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
rank = shortlog -sn --no-merges
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"
diverges = !bash -c 'diff -u <(git rev-list --first-parent "${1}") <(git rev-list --first-parent "${2:-HEAD}") | sed -ne \"s/^ //p\" | head -1' -
up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
[sendemail]
smtpencryption = tls
smtpserver = /usr/bin/msmtp
user = [email protected]
suppresscc = all
cc = [email protected]
aliasfiletype = ~/.mutt/alias
[core]
editor = vim
pager = less -R
[push]
default = matching