mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Update gitconfig
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
[user]
|
[user]
|
||||||
name = David Tomaschik
|
name = David Tomaschik
|
||||||
email = david@systemoverlord.com
|
useConfigOnly = true
|
||||||
signingKey = 0x5DEA789B
|
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
@@ -73,9 +72,6 @@
|
|||||||
[mergetool]
|
[mergetool]
|
||||||
prompt = false
|
prompt = false
|
||||||
|
|
||||||
[include]
|
|
||||||
path = ~/.gitconfig.local
|
|
||||||
|
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
|
|
||||||
@@ -94,3 +90,10 @@
|
|||||||
clean = git-lfs clean -- %f
|
clean = git-lfs clean -- %f
|
||||||
smudge = git-lfs smudge -- %f
|
smudge = git-lfs smudge -- %f
|
||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
|
|
||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.d/override
|
||||||
|
path = ~/.gitconfig.d/local
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/personal/"]
|
||||||
|
path = ~/.gitconfig.d/personal
|
||||||
|
|||||||
5
dotfiles/gitconfig.d/override
Normal file
5
dotfiles/gitconfig.d/override
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[user]
|
||||||
|
email = david@systemoverlord.com
|
||||||
|
|
||||||
|
[github]
|
||||||
|
user = matir
|
||||||
2
dotfiles/gitconfig.d/personal
Normal file
2
dotfiles/gitconfig.d/personal
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = david@systemoverlord.com
|
||||||
26
install.sh
26
install.sh
@@ -126,31 +126,6 @@ install_keys() {
|
|||||||
install_known_hosts
|
install_known_hosts
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_git_email() {
|
|
||||||
local gc_local="${HOME}/.gitconfig.local"
|
|
||||||
local current_email=""
|
|
||||||
|
|
||||||
if [[ -f "${gc_local}" ]]; then
|
|
||||||
current_email=$(git config -f "${gc_local}" user.email || true)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${GIT_EMAIL:-}" ]]; then
|
|
||||||
# Use environment variable
|
|
||||||
git config -f "${gc_local}" user.email "${GIT_EMAIL}"
|
|
||||||
elif [[ -n "${current_email}" ]]; then
|
|
||||||
# Already has an email set
|
|
||||||
GIT_EMAIL="${current_email}"
|
|
||||||
else
|
|
||||||
# Prompt the user
|
|
||||||
echo -n "Enter git email (leave blank to skip): " >&2
|
|
||||||
read -r GIT_EMAIL || true
|
|
||||||
if [[ -n "${GIT_EMAIL}" ]]; then
|
|
||||||
git config -f "${gc_local}" user.email "${GIT_EMAIL}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
export GIT_EMAIL
|
|
||||||
}
|
|
||||||
|
|
||||||
read_saved_prefs() {
|
read_saved_prefs() {
|
||||||
# Can't use basedir here as we don't have it yet
|
# Can't use basedir here as we don't have it yet
|
||||||
local pref_file="$(dirname "$0")/.installed-prefs"
|
local pref_file="$(dirname "$0")/.installed-prefs"
|
||||||
@@ -252,7 +227,6 @@ install_main() {
|
|||||||
link_directory_contents "${BASEDIR}/bin" "${HOME}/bin" ""
|
link_directory_contents "${BASEDIR}/bin" "${HOME}/bin" ""
|
||||||
[[ "$INSTALL_KEYS" = 1 ]] && install_keys
|
[[ "$INSTALL_KEYS" = 1 ]] && install_keys
|
||||||
save_prefs
|
save_prefs
|
||||||
setup_git_email
|
|
||||||
cleanup
|
cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user