dotfiles/roles/git/templates/gitconfig.j2

50 lines
944 B
Plaintext
Raw Normal View History

# This is Git's per-user configuration file,
# this file is managed by ansible.
{% if git_do_sign %}
[gpg]
program = {{ git_gpg_program }}
{% endif %}
2020-07-05 11:38:49 +02:00
[user]
name = "{{ git_author }}"
2020-07-05 11:38:49 +02:00
email = {{ git_email }}
{% if git_do_sign %}
signingkey = {{ git_signingkey }}
{% endif %}
[commit]
{% if git_do_sign %}
gpgsign = true
{% endif %}
[alias]
{% for alias in git_aliases %}
{{ alias.name }} = {{ alias.cmd }}
2020-07-05 11:38:49 +02:00
{% endfor %}
[pull]
rebase = {{ git_pull_rebase|bool|lower }}
{% if git_pull_ff_only|bool %}
ff = only
{% endif %}
[rebase]
autostash = {{ git_rebase_autostash|bool|lower }}
[merge]
autostash = {{ git_merge_autostash|bool|lower }}
[init]
defaultBranch = {{ git_default_branch }}
[core]
editor = {{ git_config_preferred_editor }}
2020-07-05 11:38:49 +02:00
{% for cred in git_credentials %}
[credential "{{ cred.remote_url }}"]
username = {{ cred.username }}
{% if cred.helper is defined %}
helper = {{ cred.helper }}
{% endif %}
{% endfor %}