[color] ui = auto [color "branch"] current = cyan bold reverse local = white plain = remote = cyan [color "diff"] meta = black frag = black old = red new = green [color "status"] added = green changed = blue header = localBranch = nobranch = remoteBranch = cyan bold unmerged = yellow bold reverse untracked = black updated = blue [core] editor = code --wait pager = delta autocrlf = false safecrlf = false mergeoptions = --no-edit excludesfile = ~/.gitignore quotepath = false # Enable parallel index preload for operations like git diff preloadindex = true # in large repositories fsmonitor = true untrackedCache = true [alias] # Add (stage) file a = add # Unadd (unstage) file ua = reset HEAD # Checkout co = checkout # Status s = status --short # Diff d = diff # Cherry pick cp = cherry-pick # Sharable diff with disabled syntax highlighting and +/- marks patch = !git --no-pager diff --no-color # Merge fresh master into the current branch mmm = !git fetch origin master && git merge origin/master --no-edit mmn = !git fetch origin main && git merge origin/main --no-edit # Compact and readable log l = log --graph --pretty=format:'%C(yellow)%d %C(white)%s%C(reset) — %C(bold)%an%C(reset) %C(dim)%ar%C(reset) %C(dim)(%h)%C(reset)' # Log with list of changed files for each commit ll = log --stat --abbrev-commit # List of my own commits my = !git log --branches=* --no-merges --pretty=format:'%C(reset)%C(bold)%cd %C(reset)%C(white)%s %C(reset)%h' --date=short --author=\"$(git config user.name)\" # List of branches ordered by last change branches = for-each-ref --sort=-committerdate refs/heads/ --format='%(color:bold)%(refname:short)%(color:reset)\t%(committerdate:relative)' # List of files with merge conflicts wtf = diff --name-only --diff-filter=U # Rebase: add changes and continue cont = !git add . && git rebase --continue # Rebase: skip a rebase step skip = rebase --skip # Rebase: abort abort = rebase --abort # Cancel local commits in the branch: git fuck master fuck = "!f() { git reset --hard origin/$1; }; f" # Remove all changes, including untracked files nuke = !git reset --hard && git clean -f -d # Add all modified files to the latest commit append = commit -a --amend --no-edit [pull] # Don't rebase on pulling: annoying, especially in VS Code rebase = false [push] # When pushing code, always push only your current branch to a branch of the same name default = current # Automatically set up upstream tracking autoSetupRemote = true [fetch] # Automatically prune deleted branches from your local copy when you fetch (or pull) prune = true [log] # Show branch names with git log decorate = short # Any GitHub repo with my username should be checked out read/write by default # http://rentzsch.tumblr.com/post/564806957/public-but-hackable-git-submodules [url "git@github.com:sapegin/"] insteadOf = "git://github.com/sapegin/" # git-delta [pager] diff = delta show = delta reflog = delta show = delta [interactive] diffFilter = delta --color-only [add.interactive] useBuiltin = false [delta] features = squirrelsong-dark navigate = false light = false hyperlinks = true hyperlinks-file-link-format = "vscode://file/{path}:{line}" [merge] conflictstyle = zdiff3 [diff] algorithm = histogram colorMoved = default # Default values for new repositories [init] defaultBranch = main [user] name = Artem Sapegin email = artem@sapegin.me # Include local settings [include] path = ~/_/squirrelsong/themes/Git/themes.gitconfig path = .gitlocal # Some random bullshit that always appears at the end of the config file [filter "media"] required = true clean = git media clean %f smudge = git media smudge %f [filter "hawser"] clean = git hawser clean %f smudge = git hawser smudge %f required = true [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [column] ui = auto [branch] sort = -committerdate