-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
98 lines (79 loc) · 2.31 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
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
[user]
name = carloluis
email = [email protected]
[alias]
# log
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
history = log --pretty=format:'%C(bold)%h%Creset %C(magenta)%ad%Creset | %s%Cred%d%Creset %C(bold yellow)[%an]%Creset %C(cyan)(%cr)%Creset' --graph --date=short
graph = log --oneline --abbrev-commit --all --graph --decorate --color
changes = log --pretty=format:'%h %cr %cn %Cgreen%s%Creset' --name-status
# commit
c = commit -m # commit with message
ca = commit -am # commit all with message
ci = commit # commit
amend = commit --amend # amend your last commit
# checkout
co = checkout # checkout
nb = checkout -b # create and switch to a new branch
# status
st = status -sb
stat = status
s = status
# branch
b = branch -v # branch (verbose)
br = branch # branch
# diff
d = diff # diff unstaged changes
dc = diff --cached # diff staged changes
last = diff HEAD^ # diff last committed change
branches-to-prune = remote prune origin --dry-run
clean-remote = remote prune origin
# show verbose output (all branches, remotes repositories, tags)
branches = branch -a
remotes = remote -v
tags = tag -l
# reset
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
# undo last commit (keep/delete changes)
undo-last-commit = reset --soft HEAD~1
undo-permanently = reset --hard HEAD~1
filelog = log -u # show changes to a file
rl = reflog
# stash
ss = stash # stash changes
sl = stash list # list stashes
sa = stash pop # apply stash
sd = stash drop # drop stashes
# contributors info
contributors = shortlog --summary --numbered
contrib = shortlog --summary --numbered
# git ignore generator
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
# list aliases
aliases = config --get-regexp alias
[core]
excludesfile = ~/.gitignore_global
autocrlf = input
safecrlf = true
editor = vim
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = cyan bold
new = green
old = red
[color "status"]
header = white bold dim
branch = magenta bold
nobranch = magenta reverse
added = green bold
changed = yellow bold
untracked = cyan bold
unmerged = red dim bold
[diff]
renames = copies