dotfiles/scripts/git.sh

32 lines
1.0 KiB
Bash
Raw Normal View History

2021-08-14 02:35:38 +00:00
#!/usr/bin/env bash
# Aliases
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.cl clone
git config --global alias.co checkout
git config --global alias.df diff
2021-12-13 06:53:30 +00:00
git config --global alias.fe "fetch --all --tags"
2021-11-27 05:14:35 +00:00
git config --global alias.lg "log --stat"
2022-05-26 07:12:23 +00:00
git config --global alias.lg1 "log --oneline"
2021-12-13 06:53:30 +00:00
git config --global alias.pl "pull --tags"
2021-08-14 02:35:38 +00:00
git config --global alias.ps push
git config --global alias.st status
git config --global alias.sw switch
git config --global alias.tg "tag --sort=-version:refname"
2021-08-14 02:35:38 +00:00
# Misc
git config --global pull.rebase true
git config --global fetch.prune true
git config --global init.defaultBranch main
git config --global diff.colorMoved default
git config --global merge.conflictstyle diff3
git config --global core.fsmonitor true
git config --global push.autoSetupRemote true
# Delta
# https://github.com/dandavison/delta
git config --global core.pager delta
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true