From c7c34c1d799450cb747af9ac6f6c6142c2692c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Mon, 31 May 2021 23:39:52 -0400 Subject: [PATCH] Add useful global git configuration --- tools/git-setup.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/git-setup.md b/tools/git-setup.md index 400501f..1993cf8 100644 --- a/tools/git-setup.md +++ b/tools/git-setup.md @@ -3,14 +3,32 @@ ## Tell git who you are -``` +```bash $ git config --global user.name 'Jean R. Hacker' $ git config --global user.email 'jean@agaric.com' ``` +## Align on some basics + +Have same default branch, pull settings, and ability to see vault diffs as other Agarics. + +```bash +git config --global init.defaultBranch main +git config --global pull.ff only +git config --global diff.ansible-vault.textconv "ansible-vault view" +``` + +## Let Git's git clean fully clean out (optional) + +This one's a little dangerous, but use `git clean` carefully and appreciate not having to manually delete unwanted local files. + +```bash +git config --global clean.requireForce false +``` + ## Create a personal excludesfile (optional) -``` +```bash $ touch ~/.gitignore $ git config --global core.excludesfile ~/.gitignore ```