fix: codespaces gitconfig override
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
[user]
|
||||
name = Andrejus
|
||||
email = git@andrejus.uk
|
||||
[include]
|
||||
path = ~/.gitconfig.local
|
||||
|
||||
[github]
|
||||
user = andrejusk
|
||||
|
||||
3
home/.gitconfig.local
Normal file
3
home/.gitconfig.local
Normal file
@@ -0,0 +1,3 @@
|
||||
[user]
|
||||
name = Andrejus
|
||||
email = git@andrejus.uk
|
||||
@@ -30,6 +30,7 @@ root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
|
||||
rm -f "$HOME/.bash_profile"
|
||||
rm -f "$HOME/.bashrc"
|
||||
rm -f "$HOME/.gitconfig"
|
||||
rm -f "$HOME/.gitconfig.local"
|
||||
rm -f "$HOME/.profile"
|
||||
rm -f "$HOME/.zshrc"
|
||||
rm -f "$HOME/.p10k.zsh"
|
||||
@@ -40,6 +41,11 @@ mkdir -p "$HOME/.ssh"
|
||||
|
||||
stow --dir="$root_dir" --target="$HOME" home
|
||||
|
||||
# In Codespaces, remove .gitconfig.local so the auto-provisioned identity is used
|
||||
if [[ "$DOTS_ENV" == "codespaces" ]]; then
|
||||
rm -f "$HOME/.gitconfig.local"
|
||||
fi
|
||||
|
||||
# Bust PATH cache to force rebuild with new profile
|
||||
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user