130 lines
3.6 KiB
INI
130 lines
3.6 KiB
INI
[user]
|
||
name = alexandra catalina
|
||
email = git@garbage.world
|
||
|
||
[credential]
|
||
helper = store
|
||
|
||
[core]
|
||
# Use custom `.gitignore` and `.gitattributes`
|
||
excludesfile = ~/.gitignore
|
||
attributesfile = ~/.gitattributes
|
||
|
||
# Treat spaces before tabs and all kinds of trailing whitespace as an error
|
||
# [default] trailing-space: looks for spaces at the end of a line
|
||
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
|
||
whitespace = space-before-tab,trailing-space
|
||
|
||
# Make `git rebase` safer on macOS
|
||
# http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/
|
||
trustctime = false
|
||
autocrlf = input
|
||
|
||
# https://github.com/dandavison/delta#get-started
|
||
# pager = delta
|
||
|
||
# [interactive]
|
||
# diffFilter = delta --color-only
|
||
|
||
# [delta]
|
||
# navigate = true
|
||
# line-numbers = true
|
||
# side-by-side = true
|
||
|
||
[diff]
|
||
colorMoved = default
|
||
|
||
# https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
|
||
[transfer]
|
||
fsckobjects = true
|
||
|
||
[fetch "fsck"]
|
||
zeroPaddedFilemode = ignore
|
||
badTimezone = ignore
|
||
|
||
[apply]
|
||
# Detect whitespace errors when applying a patch
|
||
whitespace = fix
|
||
|
||
[pull]
|
||
ff = only
|
||
|
||
[push]
|
||
default = simple
|
||
|
||
# Make `git push` push relevant annotated tags when pushing branches out.
|
||
followTags = true
|
||
|
||
[merge]
|
||
conflictStyle = diff3
|
||
# Include summaries of merged commits in newly created merge commit
|
||
# messages
|
||
log = true
|
||
|
||
[alias]
|
||
m = checkout master
|
||
bare = config --bool core.bare true
|
||
cam = commit -am
|
||
change = log -1 -p --color
|
||
chp = cherry-pick
|
||
cm = commit -m
|
||
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
|
||
lag = --no-pager log --pretty=oneline --color
|
||
ready = diff --cached --color
|
||
st = status
|
||
them = merge -s recursive -X theirs
|
||
|
||
# fill out a shallow clone of a repository
|
||
unshallow = fetch --unshallow
|
||
|
||
# Print last commit time for file
|
||
last = log -n 1 --pretty=format:%cd --date=local --
|
||
|
||
# Show the diff between the latest commit and the current state
|
||
d = !"git diff-index --quiet HEAD -- || git diff --patch-with-stat"
|
||
|
||
# `git di $number` shows the diff between the state `$number`
|
||
# revisions ago and the current state
|
||
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
|
||
|
||
# Show verbose output about tags, branches or remotes
|
||
tags = tag -l
|
||
branches = branch -a
|
||
remotes = remote -v
|
||
|
||
# Amend the currently staged files to the latest commit
|
||
amend = commit --amend --reuse-message=HEAD
|
||
|
||
# find when a file was deleted, rip to it 👼
|
||
rip = log --diff-filter=D --
|
||
|
||
# Find branches containing commit
|
||
fb = "!f() { git branch -a --contains $1; }; f"
|
||
|
||
# Find tags containing commit
|
||
ft = "!f() { git describe --always --contains $1; }; f"
|
||
|
||
# Find commits by source code
|
||
fc = "!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
|
||
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
|
||
|
||
# Remove branches that have already been merged with master
|
||
# a.k.a. ‘delete merged’
|
||
dm = "!git branch --merged | grep -v 'master' | grep -v 'main' | grep -v 'trunk' | grep -v '\\*' | xargs -n 1 git branch -d"
|
||
|
||
# check out github pull requests by number
|
||
# https://github.com/thoughtbot/guides/tree/master/protocol/open-source#accepting-a-github-pull-request
|
||
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
|
||
|
||
# make patch of last commit
|
||
mp = format-patch HEAD~1..HEAD
|
||
|
||
[status]
|
||
submoduleSummary = true
|
||
[http]
|
||
version = HTTP/1.1
|
||
[init]
|
||
defaultBranch = trunk
|