Git
-
Set up git config.
cp ~/Dropbox/Basic/new_machine/linux/.gitconfig ~/Note
~/.gitconfigsource[alias] lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' lg = lg1 [color] ui = auto [core] pager = delta editor = emacs excludesfile = /home/s/.gitignore_global hooksPath = ~/.config/.git_templates/hooks [delta] features = side-by-side line-numbers decorations whitespace-error-style = 22 reverse [delta "decorations"] commit-decoration-style = bold yellow box ul file-style = bold yellow ul file-decoration-style = none [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [init] templatedir = /home/s/.config/.git_templates [interactive] diffFilter = delta --color-only [merge] tool = meld [pager] diff = delta log = delta reflog = delta show = delta [pull] rebase = false [user] name = S Aufrecht email = s@aufrecht.org [mergetool "meld"] cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED" [push] autoSetupRemote = true -
Install templates. Specifically, this adds one pre-commit check that blocks commits that contain
DO NOT COMMITorbreakpoint.cp -R ~/Dropbox/Basic/new_machine/linux/.git_templates ~/chmod 755 ~/.git_templates/hooks/pre-commitConfigure git to use the templates.git config --global init.templatedir '~/.git-templates'