Add useful global git configuration

This commit is contained in:
benjamin melançon 2021-05-31 23:39:52 -04:00
parent 08da7d37ac
commit c7c34c1d79

View file

@ -3,14 +3,32 @@
## Tell git who you are ## Tell git who you are
``` ```bash
$ git config --global user.name 'Jean R. Hacker' $ git config --global user.name 'Jean R. Hacker'
$ git config --global user.email 'jean@agaric.com' $ 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) ## Create a personal excludesfile (optional)
``` ```bash
$ touch ~/.gitignore $ touch ~/.gitignore
$ git config --global core.excludesfile ~/.gitignore $ git config --global core.excludesfile ~/.gitignore
``` ```