-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
76 lines (70 loc) · 2.13 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
[user]
name = Julien Silva
email = [email protected]
[alias]
# http://blackpixel.com/blog/2012/11/code-review-kaleidoscope.html
ksreview = "!f() { local SHA=${1:-HEAD}; local BRANCH=${2:-master}; if [ $SHA == $BRANCH ]; then SHA=HEAD; fi; git difftool -y -t Kaleidoscope $BRANCH...$SHA; }; f"
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
s = status
f = fetch
dt = difftool
cm = commit -m
cam = commit -am
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Undo a `git push`
undopush = push -f origin HEAD^:master
# Display the number of commits per author in numerical order
who = shortlog -sn --
# Unstage previous commit
goddammit = !git reset --soft HEAD^
# `git remote prune origin`: remove remote-tracking branches that were deleted from the remote repo
# `git gc`: cleanup unnecessary files and optimize the local repository
# `git clean -df`: remove untracked files and directories from the working tree
# `git stash clear`: remove all stashed states
trim = !git remote prune origin && git gc
cleanup = !git clean -df && git stash clear
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
excludesfile = /Users/jsilva/.gitignore_global
quotepath = false
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[rerere]
enabled = true
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool]
prompt = false
[merge]
tool = Kaleidoscope
[help]
autocorrect = 1
[push]
default = simple