2013-08-08 03:23:13 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
# Set vim as default git editor
|
|
|
|
# Turn on colors
|
|
|
|
git config --global color.ui auto
|
|
|
|
# Set diff tool to vimdiff
|
2022-09-28 18:39:23 +00:00
|
|
|
if type nvim &>/dev/null ; then
|
|
|
|
git config --global diff.tool nvim -d
|
|
|
|
else
|
|
|
|
git config --global diff.tool vimdiff
|
|
|
|
fi
|
2013-08-08 03:23:13 +00:00
|
|
|
# Suppress launching prompt
|
|
|
|
git config --global difftool.prompt false
|
2022-09-28 18:29:34 +00:00
|
|
|
# Make main my default branch
|
|
|
|
git config --global init.defaultBranch main
|
|
|
|
# Set pull behavior
|
|
|
|
git config --global pull.ff only
|
|
|
|
|
2019-04-15 17:07:42 +00:00
|
|
|
# Create global ignore file
|
2023-03-08 23:00:37 +00:00
|
|
|
mkdir -p "$XDG_CONFIG_HOME/git"
|
2019-04-15 17:07:42 +00:00
|
|
|
try_link "exclude_global" "$XDG_CONFIG_HOME/git/exclude_global"
|
2022-09-28 18:29:34 +00:00
|
|
|
git config --global core.excludesfile "$XDG_CONFIG_HOME/git/exclude_global"
|
|
|
|
|
|
|
|
# Add some includes
|
|
|
|
try_link "user_vividboarder.inc" "$XDG_CONFIG_HOME/git/user_vividboarder.inc"
|
|
|
|
git config --global includeif.gitdir:~/workspace/vividboarder/.path "$XDG_CONFIG_HOME/git/user_vividboarder.inc"
|