2021-08-14 02:35:38 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-10-10 10:50:47 +00:00
|
|
|
# Global aliases
|
2022-11-25 04:47:49 +00:00
|
|
|
git config --global alias.ass add
|
2024-03-04 16:59:53 +00:00
|
|
|
git config --global alias.br branch
|
|
|
|
git config --global alias.brv "branch -v --sort=-committerdate"
|
2021-08-14 02:35:38 +00:00
|
|
|
git config --global alias.ci commit
|
|
|
|
git config --global alias.cl clone
|
|
|
|
git config --global alias.co checkout
|
2022-10-11 05:47:46 +00:00
|
|
|
git config --global alias.df "diff -w"
|
2023-10-10 10:50:47 +00:00
|
|
|
git config --global alias.dfc "diff -w --cached"
|
2021-12-13 06:53:30 +00:00
|
|
|
git config --global alias.fe "fetch --all --tags"
|
2024-01-16 15:18:44 +00:00
|
|
|
git config --global alias.lg "log --stat --abbrev-commit"
|
|
|
|
git config --global alias.lg1 "log --oneline --graph"
|
2022-11-25 05:37:00 +00:00
|
|
|
git config --global alias.me merge
|
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
|
2024-05-07 18:16:44 +00:00
|
|
|
git config --global alias.psa "!git remote | xargs -L1 -P8 git push"
|
|
|
|
git config --global alias.psaf "!git remote | xargs -L1 -P8 git push --force-with-lease"
|
2023-09-24 15:04:54 +00:00
|
|
|
git config --global alias.psf "push --force-with-lease"
|
2023-02-22 10:04:41 +00:00
|
|
|
git config --global alias.rank "shortlog -nse --no-merges"
|
2024-07-19 04:51:16 +00:00
|
|
|
git config --global alias.rst restore
|
2023-12-16 16:32:21 +00:00
|
|
|
git config --global alias.sh show
|
2021-08-14 02:35:38 +00:00
|
|
|
git config --global alias.st status
|
2024-07-07 08:34:34 +00:00
|
|
|
git config --global alias.stcl "stash clear"
|
|
|
|
git config --global alias.sth stash
|
|
|
|
git config --global alias.stp "stash pop"
|
2021-08-14 02:35:38 +00:00
|
|
|
git config --global alias.sw switch
|
2021-11-29 02:42:34 +00:00
|
|
|
git config --global alias.tg "tag --sort=-version:refname"
|
2021-08-14 02:35:38 +00:00
|
|
|
|
|
|
|
# Misc
|
2024-02-17 08:26:20 +00:00
|
|
|
git config --global commit.verbose true
|
|
|
|
git config --global core.excludesfile "~/.config/git/ignore"
|
2022-09-13 09:24:45 +00:00
|
|
|
git config --global core.fsmonitor true
|
2024-02-17 08:26:20 +00:00
|
|
|
git config --global diff.algorithm histogram
|
2023-10-06 07:37:32 +00:00
|
|
|
git config --global diff.colorMoved no
|
2024-02-18 13:12:18 +00:00
|
|
|
git config --global diff.submodule log
|
2021-08-14 02:35:38 +00:00
|
|
|
git config --global fetch.prune true
|
2024-04-13 18:47:31 +00:00
|
|
|
git config --global http.postBuffer 500000000
|
2021-08-14 02:35:38 +00:00
|
|
|
git config --global init.defaultBranch main
|
2024-02-17 16:07:53 +00:00
|
|
|
git config --global log.date iso
|
2024-02-14 16:09:20 +00:00
|
|
|
git config --global merge.conflictstyle zdiff3
|
2023-12-26 09:10:57 +00:00
|
|
|
git config --global pull.rebase false
|
2022-09-13 09:24:45 +00:00
|
|
|
git config --global pull.twohead ort
|
2022-07-03 14:36:57 +00:00
|
|
|
git config --global push.autoSetupRemote true
|
2023-01-13 17:02:48 +00:00
|
|
|
git config --global rebase.stat true
|
2024-02-10 01:53:58 +00:00
|
|
|
git config --global rerere.enabled true
|
2024-02-17 16:07:53 +00:00
|
|
|
git config --global status.submoduleSummary true
|
|
|
|
git config --global submodule.recurse true
|
2023-10-06 07:33:59 +00:00
|
|
|
|
|
|
|
# https://github.com/dandavison/delta
|
|
|
|
git config --global core.pager delta
|
2023-10-06 08:36:50 +00:00
|
|
|
git config --global delta.file-decoration-style none
|
|
|
|
git config --global delta.hunk-header-decoration-style none
|
2024-03-08 16:03:12 +00:00
|
|
|
git config --global delta.navigate true
|
2023-10-10 10:50:47 +00:00
|
|
|
|
|
|
|
# https://github.com/Wilfred/difftastic
|
2024-03-08 16:03:12 +00:00
|
|
|
git config --global alias.dfct "difftool --cached"
|
|
|
|
git config --global alias.dft "difftool"
|
2023-10-10 10:50:47 +00:00
|
|
|
git config --global diff.tool difftastic
|
|
|
|
git config --global difftool.difftastic.cmd 'difft "$LOCAL" "$REMOTE"'
|
2024-03-08 16:03:12 +00:00
|
|
|
git config --global difftool.prompt false
|
2023-10-10 10:50:47 +00:00
|
|
|
git config --global pager.difftool true
|