-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
65 lines (48 loc) · 1.79 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
[user]
name = Guilherme Simoes
# Forces name and email to be set.
# Email is not globally set so that I don't accidentally commit with the wrong email.
useconfigonly = true
[color]
# Enable colors
ui = auto
[core]
# Detect and color whitespace issues when `git diff` is run
whitespace = trailing-space,space-before-tab
# Set text editor
editor = vim
[alias]
# List aliases. How meta!
aliases = "!f() { git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort; }; f"
# List remote branches ordered by the last time they were updated
rbranches = "!f() { for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format='%ci %cr' $branch | head -n 1` \\t$branch; done | sort -r; }; f"
# Interactive rebase up to the nth commit
reb = "!f() { echo 'Stashing unstaged changes'; git stash; git rebase -i HEAD~$1; }; f"
# List all my commits ordered by date
recap = !git log --all --no-merges --author=${1-$(git config user.email)} --pretty=format:'%h %ad %s' --date=short
# List people ordered by commits count
stats = shortlog -sn --all --no-merges
# List my commits created today
today = !git log --all --since=00:00:00 --oneline --no-merges --author=${1-$(git config user.email)}
# Show last stash if no argument is given, otherwise show nth stash
vstash = "!f() { stash=${1-0}; git stash show -p stash@{$stash}; }; f"
# List where and when HEAD has been
watwork = reflog show --date=format:'%Y-%m-%d %H:%M'
amend = commit --amend
co = checkout
cont = rebase --continue
del = branch -d
rdel = push --delete origin
pa = add --patch
st = status
[diff]
indentHeuristic = true
[push]
# Push only the current branch with `git push`
default = current
[pull]
# Avoid merges when pulling
rebase = true
[merge]
# Get more understandable diffs
conflictstyle = zdiff3