forked from tangledhelix/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
132 lines (97 loc) · 3.87 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
[user]
name = Dan Lowe
email = [email protected]
[alias]
# Short status output, just give me the good stuff.
st = status -s
# Hard-coded into my fingers from RCS days...
co = checkout
ci = commit
# Smooth over git's dumb command names.
branches = branch -a
tags = tag -l
stashes = stash list
remotes = remote -v
# Unstage anything staged right now.
unstage = reset -q HEAD --
# Throw out any modifications to tracked files.
discard = checkout --
# Pretend that last commit was never committed.
uncommit = reset --mixed HEAD~
# Update commit message on current commit.
amend = commit --amend
# Show me a graph or what's been going on recently; last 10 commits
graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order
# To run before a commit, see what is about to be committed.
precommit = diff --cached --diff-algorithm=minimal -w
# NOTE: can use -M to detect moves, so you don't get an entire
# file of `-` and then a file of `+`.
# git diff --staged -M
# Pretty log output with lot of info
# also use "lg -p" to see it with patches for each commit.
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate=full
# See the pretty log output but include the name/status of changed paths.
lgv = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate=full --name-status
# Another variant showing default log output, but with file info.
logv = log --name-status
# Not yet added - doesn't include ignored files
new = ls-files --others --exclude-standard
# Files that are in the staging area
added = diff --cached --name-only
# Git log of last 24 hours
today = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
# Fast-forward; does nothing if fast-forward not possible.
ff = merge --ff-only
# Pull all submodules (not recursive!)
pullsubs = submodule foreach git pull origin master
# Which tag am I on, or the nearest ancestor?
# `git describe` might also be an option here.
whichtag = !git name-rev --tags --name-only $(git rev-parse HEAD)
# List (local) branches sorted by date of last commit
branchesbydate = !git for-each-ref --sort='-committerdate' --format='%(committerdate) %(refname)' refs/heads | sed -e 's,refs/heads/,,'
# Show file create/remove changes in the diff
filechanges = diff --summary
# Diff with word-diff
wdiff = diff --word-diff
# Show SHA of HEAD, or of passed ref
id = log --pretty=format:'%H' -n 1
hash = log --pretty=format:'%H' -n 1
undo = "!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f"
[core]
pager = less
editor = vim
quotepath = false
excludesfile = ~/.gitignore
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[github]
user = tangledhelix
[diff]
# For Github-style word diffs
wordRegex = [^[:space:]]
tool = Kaleidoscope
[push]
# Push current branch even if you've never pushed it before
default = current
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge --skip %f
process = git-lfs filter-process --skip
[mergetool "Kaleidoscope"]
cmd = /usr/local/bin/ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustexitcode = true
[merge]
tool = Kaleidoscope
[difftool "Kaleidoscope"]
cmd = /usr/local/bin/ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool]
prompt = false
[fetch]
prune = true