summaryrefslogtreecommitdiff
path: root/.config/git/config
blob: b7066e12d152293cce59e0f0e32910cb393fdeab (plain)
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
[alias]
	# Note on completion: contrib/completion/git-completion.bash
	# understands the "function idiom"…
	#     ALIAS = "!f() { git CMD … ; } && f"
	# … and will complete 'git ALIAS' like it completes 'git CMD'.
	# For more complex functions that do not start with a 'git'
	# command, aliases can request a completion strategy using an
	# empty ':' statement:
	#     ALIAS = !f() { : git CMD ; … ; } && f

	# Compare upstream...HEAD with upstream...push.  Useful to
	# answer questions like:
	#
	# * Will this rebase drop approvals?
	#
	# * What is up with that old worktree?  HEAD is more recent
	#   than @{push}, but commits look similar; are they?  If they
	#   are, HEAD is a simple rebase of @{push}; if not, HEAD has
	#   unpushed changes which need inspection.
	cmp-push = "!f () { git diff-id @{u}... ; git diff-id @{u}...@{push} ; } && f"

	# Get a patch-id for arbitrary diffs.
	diff-id = "!f() { git diff \"$@\" | git patch-id ; } && f"

[init]
	# Whence branches grow.
	defaultBranch = trunk

[push]
	# I do not often run unqualified 'git push', but I sometimes
	# want to review @{push}, meaning "the public state of my
	# feature branch, as visible on the push-remote, that I am
	# about to clobber with -f"; e.g. to compare patch-id's.
	#
	# With 'push.default = simple' (the default), @{push} is
	# unusable on feature branches:
	# > cannot resolve 'simple' push to a single destination
	#
	# AFAIU, 'current' DWIM.
	default = current

# Set identity elsewhere, in places that more applications care about:
# * user.email: EMAIL environment variable.
# * user.name: /etc/passwd.