-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
92 lines (92 loc) · 3.46 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
# my ~/.gitconfig, annotated with teaching comments
[core]
# Global gitignore file to layer on top of repo-specific gitignore files.
# Put things like text editor-specific or operating system-specific junk
# files here. Those don't belong in an individual repo .gitignore
excludesfile = ~/.gitignore_global
[user]
name = Andrew Imeson
email = andrew@andrewimeson.com
# Sign commits with this GPG key
signingkey = 9FC9E016
[gpg]
program = gpg
# If a repository is stored in this directory, load in my work-specific
# configuration overrides (e.g., set email to work email)
[includeIf "gitdir:~/Documents/Code/work/"]
path = ~/.gitconfig-work
[commit]
# Override the git commit example comments to my own template
template = ~/.gitmessage
gpgsign = true
# Show a diff of the commit in the editor when running 'git commit'.
# Really helpful for deciding what to write as the commit message, and makes
# editor autocomplete pick up on keywords from the diff
verbose = true
[merge]
# Run 'git mergetool" when you have conflicts to resolve and resolve them
# using vimdiff which provides a really nice four-pane view
tool = vimdiff
[alias]
graph = log --graph --oneline --decorate
# Get the full path to the root of the repo. Useful with my groot alias in
# ./dotfiles/zsh_custom/aliases.zsh to be able to easily cd to the root of
# a repository
root = !pwd
rbi = rebase --interactive
pf = push --force-with-lease
st = status
sed = !sh -c 'git grep --null --full-name --name-only --perl-regexp -e \"$1\" | xargs -0 perl -i -p -e \"s/$1/$2/g\"' -
[github]
user = andrewimeson
[push]
# Don't make me set the upstream tracking branch on first push, assume
# current branch. Only pushes the current branch, not all branches.
default = current
[rebase]
# Automatically change "fixup!" commits to be squashed when doing an
# interactive rebase. Combine this with:
# git commit --fixup=3cd84d9
# or
# git commit --fixup=":/matching string"
# to amend past commits. Note that it will change the hash, so you shouldn't
# use this for commits that are already in a shared branch.
autosquash = true
# Automatically create a temporary stash and then pop it when rebasing
autostash = true
[url "git@github.com:"]
# Alias to reduce typing:
# 'git@github.com:organization/repo.git' becomes just
# 'gh:organization/repo.git'
insteadOf = gh:
[log]
# Show the abbreviated hash instead of the full when running 'git log'
abbrevcommit = yes
[apply]
# Automatically fix whitespace issues (like trailing spaces) when
# interactively staging commits with 'git add -p/--patch'
whitespace = fix
[interactive]
# make interactive prompts like 'git add -p/--path' respond to a single
# keypress rather than having to press 'return'
singlekey = true
[help]
# Automatically apply typo fix of git command in X deciseconds (0.1 sec)
# E.g. you accidentally run 'git lgo' and it corrects it to 'git log' unless
# you CTRL + C
autocorrect = 30
[init]
defaultBranch = master
[pager]
# Don't pager on 'git grep'
grep = false
[pull]
# Rebase (instead of merging) your branch on top of the remote branch when
# you pull
rebase = true
[fetch]
# Prune remote tracking info that no longer exists on the remote
prune = true
[submodule]
# Parallelize submodule cloning
fetchJobs = 8