From e5947f4a2dc7e7502e66bec47fe804c8390d5ace Mon Sep 17 00:00:00 2001 From: Florian Beisel Date: Mon, 17 Jun 2024 10:32:26 +0200 Subject: [PATCH] Add .gitignore_globale Add gitconfig.sh --- dot_gitignore_globale.tmpl | 68 ++++++++++++++++++++++++++++++++++++++ run_gitconfig.sh.tmpl | 10 ++++++ 2 files changed, 78 insertions(+) create mode 100644 dot_gitignore_globale.tmpl create mode 100644 run_gitconfig.sh.tmpl diff --git a/dot_gitignore_globale.tmpl b/dot_gitignore_globale.tmpl new file mode 100644 index 0000000..c865c8f --- /dev/null +++ b/dot_gitignore_globale.tmpl @@ -0,0 +1,68 @@ +{{ if eq .chezmoi.os "darwin" -}} +### macOS + +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +# Enter two ^M in the code +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +{{ end -}} + +### Vim + +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +{{ if eq .chezmoi.os "darwin" -}} +# spellfile binaries +*.add.spl +{{ end -}} + +### Python + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +.python-version + diff --git a/run_gitconfig.sh.tmpl b/run_gitconfig.sh.tmpl new file mode 100644 index 0000000..8176d14 --- /dev/null +++ b/run_gitconfig.sh.tmpl @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +git config --global core.excludesfile ~/.gitignore_global + +{{ if eq .chezmoi.os "darwin" -}} +git config --global core.autocrlf input +{{ else if eq .chezmoi.os "linux" -}} +git config --global core.autocrlf input +{{ end -}} +