You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
5.4 KiB
INI
192 lines
5.4 KiB
INI
#
|
|
# Author: Hari Sekhon
|
|
# Date: 2012-01-31 14:08:42 +0000 (Tue, 31 Jan 2012)
|
|
#
|
|
|
|
# configure your user name and email in ~/.gitconfig.local
|
|
#[user]
|
|
# name = Hari Sekhon
|
|
# email = harisekhon@gmail.com
|
|
|
|
[include]
|
|
path = .gitconfig.local
|
|
|
|
[core]
|
|
# detects filemode changes
|
|
filemode = true
|
|
# defaults to $VISUAL or $EDITOR which is set in .bash.d/env.sh
|
|
#editor = vim
|
|
# global .gitignore
|
|
excludesfile = ~/.gitignore
|
|
|
|
#whitespace = trailing-space,space-before-tab
|
|
|
|
[push]
|
|
# default = current
|
|
default = simple
|
|
|
|
[alias]
|
|
br = branch
|
|
co = checkout
|
|
ci = commit
|
|
p = push
|
|
st = status
|
|
|
|
# Show verbose output about tags, branches or remotes
|
|
tags = tag -l
|
|
branches = branch -a
|
|
remotes = remote -v
|
|
|
|
unstage = reset HEAD --
|
|
last = log -1 HEAD
|
|
|
|
# how to use commands inside git aliases
|
|
visual = !gitk
|
|
|
|
df = diff
|
|
dc = diff --cached
|
|
lg = log -p
|
|
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
|
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
|
ls = ls-files
|
|
|
|
# Show files ignored by git:
|
|
ign = ls-files -o -i --exclude-standard
|
|
|
|
# avoid diff-so-fancy so we can create patches
|
|
patch = !git --no-pager diff --no-color
|
|
|
|
[help]
|
|
# autocorrects git commands and executes the inferred command
|
|
# dangerous this just autocorrected my git rename to git rebase, lucky it errored out...
|
|
autocorrect = 0
|
|
|
|
[homebrew]
|
|
donationmessage = false
|
|
|
|
# ============================================================================ #
|
|
# G i t C o l o r
|
|
# ============================================================================ #
|
|
|
|
# colors: normal, black, red, green, yellow, blue, magenta, cyan, white
|
|
# effects: bold, dim, ul, blink and reverse
|
|
|
|
# if 2 colours given - 1st is foreground, 2nd is background
|
|
|
|
[color]
|
|
ui = auto
|
|
diff = auto
|
|
grep = auto
|
|
# do not set always here, use:
|
|
# -c color.status=always
|
|
# for specific overrides, otherwise may break gitci and related functions
|
|
status = auto
|
|
branch = auto
|
|
|
|
[color "branch"]
|
|
current = green ul
|
|
local = yellow
|
|
remote = red # default
|
|
plain = white
|
|
|
|
[color "diff"]
|
|
new = green
|
|
old = red # default
|
|
plain = white
|
|
whitespace = yellow reverse
|
|
func = yellow
|
|
#frag = cyan # default
|
|
#meta = green bold # default
|
|
# from diff-so-fancy
|
|
meta = 11
|
|
frag = magenta bold
|
|
|
|
[color "grep"]
|
|
context = white
|
|
filename = cyan
|
|
function = yellow
|
|
linenumber = green
|
|
match = red
|
|
selected = yellow
|
|
separator = white
|
|
|
|
[color "status"]
|
|
added = magenta
|
|
changed = red
|
|
untracked = cyan
|
|
branch = magenta blink
|
|
nobranch = red blink
|
|
|
|
# diff-so-fancy but I prefer most of my old preferences
|
|
#[color "diff"]
|
|
# meta = 11
|
|
# frag = magenta bold
|
|
# commit = yellow bold
|
|
# old = red bold
|
|
# new = green bold
|
|
# whitespace = red reverse
|
|
|
|
# ============================================================================ #
|
|
# D i f f - s o - f a n c y
|
|
# ============================================================================ #
|
|
|
|
# detected if installed and set via $GIT_PAGER in .bash.d/git.sh
|
|
#[core]
|
|
# pager = diff-so-fancy | less --tabs=4 -RFX
|
|
#[pager]
|
|
# don't set --pattern, overrides -F and doesn't quit less automatically for short diffs
|
|
#diff = diff-so-fancy | less --tabs=4 -RFX --pattern '^(Date|added|deleted|modified): '
|
|
#diff = diff-so-fancy | less --tabs=4 -RFX
|
|
|
|
# truncate lines in less, only for 'git blame'
|
|
#blame = less -S
|
|
|
|
|
|
[color "diff-highlight"]
|
|
#oldNormal = red bold
|
|
#oldHighlight = red bold 52
|
|
oldHighlight = normal red
|
|
#newNormal = green bold
|
|
#newNormal = green bold
|
|
newHighlight = normal green
|
|
|
|
[diff-so-fancy]
|
|
stripLeadingSymbols = false
|
|
|
|
# ============================================================================ #
|
|
|
|
#[difftool "sourcetree"]
|
|
# cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
|
# path =
|
|
#
|
|
#[mergetool "sourcetree"]
|
|
# cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
|
# trustExitCode = true
|
|
|
|
#[filter "media"]
|
|
# clean = git media clean %f
|
|
# smudge = git media smudge %f
|
|
# required = true
|
|
|
|
# ============================================================================ #
|
|
# A W S S e c r e t s
|
|
# ============================================================================ #
|
|
|
|
# AWS Secrets prevents committing secrets in to Git
|
|
|
|
# install git-secrets hooks in any repo initialized or cloned to prevent credential leak
|
|
[init]
|
|
templateDir = ~/.git-templates/git-secrets
|
|
|
|
[secrets]
|
|
providers = git secrets --aws-provider
|
|
patterns = (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}
|
|
patterns = (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')?
|
|
patterns = (\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')?
|
|
# doesn't work, doesn't support (?! ) negative lookahead regex
|
|
#patterns = (\bhari|sekhon\b)(!.*@gmail.com)
|
|
# only applies to contents, not metadata to prevent wrong author commits
|
|
#patterns = hari|sekhon
|
|
allowed = AKIAIOSFODNN7EXAMPLE
|
|
allowed = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|