commit 7c71450f0cc0e8440b3ea04ee30c2b7d50ede86e
parent dd9f36c1540744c2e82bdbe68dbeae512159045b
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Mon, 10 Jan 2022 21:06:09 +0100

Generalize git config for other computers

- Change default branch back to master
- Move GPG to different config file
- README: on server installations, delete GPG Git config file
- README: on server installations, don't assume $HOME or $XDG_DATA_HOME
  variables

Diffstat:
M.config/git/config | 7+++----
A.config/git/gpgconfig | 5+++++
MREADME.md | 6+++---
3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -1,7 +1,6 @@ [user] email = oscar@oscarbenedito.com name = Oscar Benedito - signingkey = 827E5A8E3AE8A499 [alias] a = add addurl = remote set-url --add origin @@ -29,7 +28,7 @@ smtpuser = oscar@oscarbenedito.com smtpencryption = tls smtpserverport = 587 -[commit] - gpgsign = true [init] - defaultBranch = main + defaultBranch = master ; should probably change to main someday +[include] + path = gpgconfig diff --git a/.config/git/gpgconfig b/.config/git/gpgconfig @@ -0,0 +1,5 @@ +; vim: filetype=gitconfig +[user] + signingkey = 827E5A8E3AE8A499 +[commit] + gpgsign = true diff --git a/README.md b/README.md @@ -118,10 +118,10 @@ them. For example, to only use the files under `.zshenv`, `.config/zsh`, `.config/git`, `.config/nvim` and `.config/tmux`, you could run the following: ``` -git --git-dir=/root/.local/share/dotfiles --work-tree=/root ls-files | \ +git --git-dir="${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles" --work-tree="$HOME" ls-files | \ sed '/^\.config\/\(zsh\|git\|nvim\|tmux\)\|^\.zshenv/d' | \ - xargs git --git-dir=/root/.local/share/dotfiles --work-tree=/root update-index --skip-worktree -git --git-dir=/root/.local/share/dotfiles --work-tree=/root ls-files | \ + xargs git --git-dir="${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles" --work-tree="$HOME" update-index --skip-worktree +git --git-dir="${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles" --work-tree="$HOME" ls-files | \ sed '/^\.config\/\(zsh\|git\|nvim\|tmux\)\|^\.zshenv/d' | \ xargs rm -f ```