forked from jonspeicher/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
114 lines (82 loc) · 4.19 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# .gitconfig is the user-specific global configuration file for Git. The Git documentation and Git
# itself specifically refer to this as the "global" configuration file, which can be confusing as
# it is user-specific and different from the "system" configuration and "local" configuration files.
# See:
#
# https://www.kernel.org/pub/software/scm/git/docs/git-config.html#FILES
#
# for more information, including a description of configuration file, command-line option, and
# environment variable precedence. See:
#
# https://www.kernel.org/pub/software/scm/git/docs/git-config.html
#
# for a description of all specific configuration options supported by Git.
# TBD: gitconfig_common has all but machine stuff, then gitconfig.osx and gitconfig.win?
# TBD: Machine-specific stuff here (work/home) -----------------------------------------------------
[user]
name = Jon Speicher
email = [email protected]
# TBD: Platform-specific stuff here (OS X/Windows) -------------------------------------------------
# Since line-ends are hard, here is a good explanation of why to set what for each platform:
# http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line
[core]
autocrlf = input
editor = vim
# Select the diff and merge tool for this platform and set any tool-specific options. Various tools
# are configured at the end of this file.
[diff]
tool = Kaleidoscope
[merge]
tool = Kaleidoscope
# TBD: Platform-generic stuff here -----------------------------------------------------------------
# Reject irreversible line end manipulation and point to system-wide exclude and attribute files.
[core]
safecrlf = true
excludesfile = ~/.gitignore_global
attributesfile = ~/.gitattributes_global
# Use color for all supported Git operations only when outputting to a terminal.
[color]
ui = auto
# Set up generic diff and merge options.
[difftool]
prompt = false
[merge]
log = true
[mergetool]
prompt = false
keepBackup = false
# Override Git's default less options to enable folds rather than chops for long lines, but only for
# diffs at this point in an attempt to promote good behavior in commit messages.
[pager]
diff = less -+S
# Set up convenient Git aliases. Where possible, constructs like shell functions are avoided in
# favor of mechanisms that will work across platforms like direct command aliases or, where
# arguments are required, direct subshelling.
[alias]
# TBD: These might come in handy, and also check Gary Bernhardt's:
#
# A pretty log: git log --pretty=format:'%Cred%h%Creset - %s'
# Show files changed in a given commit: git diff-tree --no-commit-id --name-only -r <commit>
# Show the commit that deleted a file: git log -1 --stat -- <path-to-now-deleted-file>
# Show commits since the common ancestor with another branch in the named paths:
# git log --topo-order --format=oneline $(git merge-base <branch1> <branch2>)..HEAD <path>
# Using difftool, show only changes to the current branch since it departed from the specified
# parent branch (or master), ignoring changes that have happened on the parent branch since.
# This is inspired by http://blackpixel.com/blog/2012/11/code-review-kaleidoscope.html.
departures = !sh -c 'git difftool ${1:-master}...HEAD' -
# This is the opposite of the alias above; using difftool, show only changes to the parent
# branch (or master) since the current branch departed from it, ignoring changes that have
# happened on the current branch since. This comes from the git-diff(1) man page at
# http://www.kernel.org/pub/software/scm/git/docs/git-diff.html.
upstream = !sh -c 'git difftool HEAD...${1:-master}' -
# Configure various external tools. A given tool may not be available on a given platform.
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[difftool "WinMerge"]
cmd = winmerge -e -u -dl \"$BASE (Previous)\" -dr \"$BASE (Current)\" \"$LOCAL\" \"$REMOTE\"
[mergetool "WinMerge"]
cmd = winmerge \"$MERGED\"
trustExitCode = false