Skip to content

Instantly share code, notes, and snippets.

@froi
Last active July 22, 2022 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froi/a8fd378bdbf0f38bd4770c475f793be6 to your computer and use it in GitHub Desktop.
Save froi/a8fd378bdbf0f38bd4770c475f793be6 to your computer and use it in GitHub Desktop.
Global Git configuration and template
[user]
name = Froilán Irizarry Rivera
email =
signingkey =
[core]
excludesfile = ~/.gitignore_global
editor = nano
quotepath = false
[color]
interactive = true
status = true
branch = true
diff = true
ui = true
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[format]
pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset
[url "git@github.com:"]
insteadOf = https://github.com/
[push]
default = simple
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[commit]
template = ~/.gitmessage
gpgsign = true
[pull]
rebase = false
[gpg]
program = gpg
[init]
defaultBranch = main
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
# --- COMMIT END ---
# Type can be
# feat (new feature)
# fix (bug fix)
# refactor (refactoring production code)
# style (formatting, missing semi colons, etc; no code change)
# docs (changes to documentation)
# test (adding or refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
# --------------------
# To write a good commit message take a look at https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
# TLDR
# - Capitalize the subject line
# - Use the imperative mood in the subject line
# - Do not end the subject line with a period
# - Separate subject from body with a blank line
# - Use the body to explain what and why vs. how
# - Can use multiple lines with "-" for bullet points in body
# --------------------
# For updated template, visit:
# https://gist.github.com/adeekshith/cd4c95a064977cdc6c50
# Licence CC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment