forked from carmensea/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
39 lines (31 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
39
[core]
# Excludesfiles allows us to set a global list of things to ignore
excludesfile = ~/.gitignore_global
# These are custom color options for the console
[color]
status = auto
diff = auto
[color "status"]
untracked = cyan
changed = green
added = yellow
# Aliases are command shortcuts
[alias]
co = checkout
# lg is now a shortcut for a pretty log with short commit messages
# See the log manpage: https://www.kernel.org/pub/software/scm/git/docs/git-log.html
# for explanations of what these options do
lg = log \
--graph \
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \
--abbrev-commit \
--date=relative
# Shorthand for commit, also enforces diff display in editor before commit
ci = commit --verbose
# Shorthand for a less noisy status
s = commit --dry-run --short
# More sensible names for adding and removing files from the readme
stage = add
unstage = reset HEAD
# Edit the last commit
amend= commit --verbose --amend