-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
69 lines (51 loc) · 1.56 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
[alias]
# Prettier git `log`
grog = log --pretty=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)' --graph --abbrev-commit --decorate --all
# Initialize a repository and commit an empty commit
it = !git init && git commit -m “root” --allow-empty
# Add everything and commit with a message
acm = !git add -A && git commit -m
# Git `commit` shorthand
cm = commit
cmm = commit -m
# Git `status` with shorthand output
st = status -bs
sti = status -bs --ignored
# Git `checkout` shorthand
co = checkout
cob = checkout -b
# Commit files in the staging area to the last commit
commend = commit --amend --no-edit
# Stash everything
stash-all = stash save --include-untracked
# Soft reset
undo = reset --soft HEAD^
# Unstage from the the staging area
unstage = reset HEAD
# Mark a file as "assume unchanged"
assume = update-index --assume-unchanged
# Reverse the above
unassume = update-index --no-assume-unchanged
# Show the files that are currently assume-unchanged
assumed = !git ls-files -v | grep ^h | cut -c 3-
# List contributors with number of commits
who = shortlog -sn
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
[color]
ui = auto
[commit]
template = ~/.gitmessage
[core]
# Global .gitignore
excludesfile = ~/.gitignore.global
[include]
# Custom .gitconfig
path = ~/.gitconfig.local
[push]
default = simple
followTags = true
[status]
showUntrackedFiles = all