forked from graste/dotfiles-etc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
142 lines (140 loc) · 6 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#
# see docs: https://www.kernel.org/pub/software/scm/git/docs/git-config.html
#
[user]
name = Steffen Gransow
email = [email protected]
editor = vim
[github]
user = graste
[credential]
helper = cache --timeout=3600
[core]
# see .gitattributes docs as well: https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
autocrlf = input
# one of: lf | crlf | native (default)
eol = native
# warn about mixed line endings
safecrlf = true
# comma separated list of common whitespace problems to notice - use "-" to disable any of them
whitespace = trailing-space,space-before-tab,tab-in-indent,-indent-with-non-tab,cr-at-eol,tabwidth=4
# trust inode change time (may be useful to set to false)
trustctime = true
[color]
interactive = auto
pager = true
showbranch = auto
status = auto
ui = auto
[alias]
# yeah...but...ehm...you know
br = branch
co = checkout
ci = commit
di = diff
st = status
# list aliases
aliases = "!git config -l | grep alias | cut -c 7-"
# useful stuff
unstage = reset HEAD --
# cdiff and sdiff are the same according to man page
cdiff = diff --cached
sdiff = diff --staged
# difff = diff HEAD | pygmentize -l diff | less -R
# subjects of log messages only: can be used with vX.X.X..vX.X.Y or --since and --until, use %B for complete commit messages
changelog = log --pretty=%s --first-parent --no-merges
# some aliases for history and last activities
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
history = log --graph --pretty=oneline --abbrev-commit
# last commit
last = log -1 HEAD
# all of last week's commits
lastweek = log --pretty=format:\"%h %ad | %s%d [%an]\" --since=\"7 days ago\" --graph --date=short
# history as colored graph with relative dates and authors
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# what's not in upstream
notup = log --graph --decorate --pretty=oneline --abbrev-commit --all @{upstream}^..
# search through things
dump = cat-file -p
type = cat-file -t
# get access to the notes that might be available due to Github discussions on a Pull Request etc.
# use this via: git show HEAD --show-notes=github-comments
# fetch = +refs/notes/*:refs/notes/*
# show diff between the latest commit and the current state
diff-latest = "!git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
# found in https://github.com/mathiasbynens/dotfiles/blob/master/.gitconfig#L8
diff-to-last = "!d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# list tags, branches and remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# latest tag
latest-tag = describe --tags --abbrev=0
# find branches containing commit
find-branches-containing-commit = "!f() { git branch -a --contains $1; }; f"
# find tags containing commit
find-tags-containing-commit = "!f() { git describe --always --contains $1; }; f"
# find commits by source code
find-commits-by-source-code = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
# find commits by commit message
find-commits-by-commit-message = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# show branches that have already been merged with master
show-merged-branches = "!git branch --merged | grep -v '\\*'"
# show all changes of a specific file including renames etc.
show-file-changes = log --follow --stat -p
[apply]
# detect a new or modified line that has whitespace errors when applying a patch
# see: core.whitespace configuration
# set to: nowarn | warn (default) | fix | error | error-all
whitespace = fix
[branch]
# set "pull" to use rebase instead of merge for all tracking branches (local and remote)
# set to: always | local | never (default) | remote
autosetuprebase = always
[diff]
# detect multiple renamed/copied files
renames = copies
[help]
format = man
autocorrect = 0
[merge]
# <<<< |||| >>>> - includes local version in addition to left and right stuff
conflictstyle = diff3
# include summaries of merged commits in newly created merge commit messages
log = true
[push]
# current = only push to the same named remote branch
# matching = push all matching local branches (default for git < v2.0)
# simple = like upstream or current - only push the current branch used for pulling (new default for git > v2.0)
# set to: current | matching | nothing | simple | upstream
default = current
[rebase]
# show a diffstat of what changed upstream since the last rebase
stat = true
[rerere]
# activate recording of resolved conflicts to get auto-resolving of identical conflicts later on
enabled = true
[status]
# show paths relative to repository root
relativePaths = true
# normal | no | all
showUntrackedFiles = normal
# summary of commits for modified submodules (true = -1 = unlimited; use a number otherwise)
submodulesummary = true
# hack on own submodules that otherwise may be readonly (via http://neva.li/post/565899843)
[url "[email protected]:graste/"]
insteadOf = "git://github.com/graste/"
[url "[email protected]:graste/"]
insteadOf = "https://github.com/graste/"
[url "[email protected]:berlinonline/"]
insteadOf = "git://github.com/berlinonline/"
[url "[email protected]:berlinonline/"]
insteadOf = "https://github.com/berlinonline/"
[giggle]
main-window-maximized = true
main-window-geometry = 0x0+0+0
history-view-vpane-position = 226
main-window-view = HistoryView
file-view-hpane-position = 286
file-view-vpane-position = 635