config (1606B)
1 [alias] 2 # Note on completion: contrib/completion/git-completion.bash 3 # understands the "function idiom"… 4 # ALIAS = "!f() { git CMD … ; } && f" 5 # … and will complete 'git ALIAS' like it completes 'git CMD'. 6 # For more complex functions that do not start with a 'git' 7 # command, aliases can request a completion strategy using an 8 # empty ':' statement: 9 # ALIAS = !f() { : git CMD ; … ; } && f 10 11 # Compare upstream...HEAD with upstream...push. Useful to 12 # answer questions like: 13 # 14 # * Will this rebase drop approvals? 15 # 16 # * What is up with that old worktree? HEAD is more recent 17 # than @{push}, but commits look similar; are they? If they 18 # are, HEAD is a simple rebase of @{push}; if not, HEAD has 19 # unpushed changes which need inspection. 20 cmp-push = "!f () { git diff-id @{u}... ; git diff-id @{u}...@{push} ; } && f" 21 22 # Get a patch-id for arbitrary diffs. 23 diff-id = "!f() { git diff \"$@\" | git patch-id ; } && f" 24 25 [init] 26 # Whence branches grow. 27 defaultBranch = trunk 28 29 [push] 30 # I do not often run unqualified 'git push', but I sometimes 31 # want to review @{push}, meaning "the public state of my 32 # feature branch, as visible on the push-remote, that I am 33 # about to clobber with -f"; e.g. to compare patch-id's. 34 # 35 # With 'push.default = simple' (the default), @{push} is 36 # unusable on feature branches: 37 # > cannot resolve 'simple' push to a single destination 38 # 39 # AFAIU, 'current' DWIM. 40 default = current 41 42 # Set identity elsewhere, in places that more applications care about: 43 # * user.email: EMAIL environment variable. 44 # * user.name: /etc/passwd.