From 21f499d6de75b08bf7c367bc5599aa704a358735 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Fri, 20 Sep 2024 07:58:51 +0200 Subject: [PATCH] feat(git): switch to $XDG_CONFIG_HOME/git/ --- .gitconfig => .config/git/config | 14 +++++++++----- .config/git/ignore | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) rename .gitconfig => .config/git/config (55%) create mode 100644 .config/git/ignore diff --git a/.gitconfig b/.config/git/config similarity index 55% rename from .gitconfig rename to .config/git/config index f0a497a..cd3f301 100644 --- a/.gitconfig +++ b/.config/git/config @@ -1,7 +1,3 @@ -[user] - name = Oliver Ladner - email = waste@lugh.ch - [core] editor = nvim @@ -29,4 +25,12 @@ [init] defaultBranch = main [merge] - conflictstyle = diff3 + conflictstyle = diff3 + +# Set a correct user.name and user.email for work projects +[includeIf "gitdir:~/git/work/"] + path = ~/git/work/gitconfig + +# Set a correct user.name and user.email for personal projects +[includeIf "gitdir:~/git/lugh/"] + path = ~/git/lugh/gitconfig diff --git a/.config/git/ignore b/.config/git/ignore new file mode 100644 index 0000000..3e98d5e --- /dev/null +++ b/.config/git/ignore @@ -0,0 +1,5 @@ +# Global gitignore - things to ALWAYS ignore +.DS_Store +Thumbs.db +.vscode +.idea