.gitconfig - neverendingqs/git-commit-it GitHub Wiki
This is a peek at a portion of my .gitconfig
, which includes
aliases I may use for this presentation.
You can find yours at C:\Users\<username>\.gitconfig
or at ~/.gitconfig
.
[core]
preloadindex = true
fscache = true
autocrlf = false
safecrlf = false
symlinks = true
commitGraph = true
editor = code --wait
[alias]
amend = commit --amend --no-edit
brm = !git branch --merged ${1-$(git get-default-branch)} | grep -v " ${1-$(git get-default-branch)}$" | xargs -r git branch -d
cleanup = "!git checkout $(git get-default-branch); git pull -p --rebase=false; git brm"
diffc = diff --cached
filediff = "!f() { echo; git diff --name-only $1; echo; }; f"
get-default-branch = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
lsconfig = config --list --show-origin
restage = update-index --again
root = rev-parse --show-toplevel
sed = "!f() { git ls-files -z | xargs -0 sed -i -e ${1}; }; f"
tcb = "!f() { git branch --show-current | xargs -I {} git branch -u origin/{} {}; }; f"
tree = log --oneline --graph --color --all --decorate
[push]
default = current
[pull]
rebase = true
[init]
defaultBranch = main