Skip to content

Commit

Permalink
git: consistency in formating and minimise duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Dec 28, 2023
1 parent 58c9d7d commit 90288ea
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 49 deletions.
7 changes: 7 additions & 0 deletions git/commit-message-griffin
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LINEARCODE Summary

# Elaboration

# Issue Status:
# Resolve: #
# Related: #
File renamed without changes.
22 changes: 12 additions & 10 deletions git/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Practicalli Git Configuration
##
## Adjust paths if not saved in `~/.config/git/`
# Practicalli dotfiles Git Configuration
#
# Adjust paths if not saved in `~/.config/git/`

# --- Conditional Configuration
# Uses relative file path to this configuration file
Expand All @@ -21,7 +21,7 @@
path = config-griffin


## -- Common Git Behaviour
# --- Common Git Behaviour

[init]
# scripts and hooks to add when creating a new local Git repository
Expand All @@ -37,7 +37,7 @@
editor = astronvim

# file and directory patterns to ignore across all projects
# excludesfile = ~/.config/git/ignore
excludesfile = ~/.config/git/ignore

# Tool to page through long output (e.g. git log). `less` is default
# pager = less
Expand All @@ -49,13 +49,15 @@
# Remove deleted remote branches from local repository
prune = true

[log]
abbrevCommit = true

[push]
# Set local brach to track new remote branch automatically, Git 2.37.0 onward
autoSetupRemote = true

[log]
abbrevCommit = true

# --- Diff & Merge

[diff]
tool = nvimdiff

Expand All @@ -64,7 +66,7 @@
conflictstyle = diff3


## --- Git commands
# --- Git commands

# command line shot cuts
[alias]
Expand Down Expand Up @@ -92,7 +94,7 @@
# autocorrect = 50


## -- Git CLI
# --- Git CLI

[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential
Expand Down
10 changes: 7 additions & 3 deletions git/config-company-linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## ------ Identity ------ ##
# Company Linux Git Configuration
#
# Adjust paths if files not saved in `~/.config/git/`

# --- Identity
# Add details for specific company identity
# Assumes use of Linux for ~ expansion

Expand All @@ -17,7 +21,7 @@
[github]
user = practicalli-johnny

## ------ Git Behaviour ------ ##
# --- Git Behaviour

[init]
# scripts and hooks to add when creating a new local Git repository
Expand Down Expand Up @@ -55,7 +59,7 @@
# Remove deleted remote branches from local repository
prune = true

## ------ Security ------ ##
# --- Security

# Use SSH key passphrase stored in MacOSX Keychain with ssh-add command
# ssh-add --apple-use-keychain $HOME/.ssh/id_ed25519
Expand Down
10 changes: 5 additions & 5 deletions git/config-company-macosx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Company specific Git configuration
# Company MacOSX Git configuration
#
# Assumes use of MacOSX and ~ expansion not working for paths
# Replace /Users/practicalli/ path with your own $HOME location

## -- Identity
# --- Identity
# Add identity to all commits
[user]
name = Johnny Stevenson
Expand All @@ -19,7 +19,7 @@
[github]
user = practicalli-johnny

## -- Git Behaviour
# --- Git Behaviour

[init]
# scripts and hooks to add when creating a new local Git repository
Expand Down Expand Up @@ -57,7 +57,7 @@
# Remove deleted remote branches from local repository
prune = true

## -- Security
# --- Security

# Use SSH key passphrase stored in MacOSX Keychain with ssh-add command
# ssh-add --apple-use-keychain $HOME/.ssh/id_ed25519
Expand All @@ -73,7 +73,7 @@
allowedSignersFile = /Users/practicalli/.config/git/allowed-signatures-company


## -- Diff & Merge
# --- Diff & Merge

# TODO: test configuration for p4merg tool on MacOSX

Expand Down
10 changes: 3 additions & 7 deletions git/config-johnny
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## -- Identity
# Personal Git configuration

# --- Identity

# Add identity to all commits
[user]
Expand All @@ -11,9 +13,3 @@
[github]
user = practicalli-johnny


## -- Git Behaviour

[commit]
# Default commit message - useful if team has a commit message policy
template = ~/.config/git/commit-message-practicalli
47 changes: 23 additions & 24 deletions git/config-practicalli
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
## ------ Identity ------ ##
# Practicalli Git Configuration
#
# for projects maintained by Practicalli
# all commits & tags are signed

# --- Identity

# Add identity to all commits
[user]
# Add identity to all commits
name = Practicalli Engineering

# Use GitHub no-reply email address to keep real address private
email = "engineering@practical.li"

# SSH Key signing (commits & tags(
# SSH Key for signing
signingkey = ~/.ssh/id_ed25519.pub

## Identity for using GitHub API
[github]
# Identity for using GitHub API
user = practicalli-johnny

# --- Security

## ------ Security ------ ##

# Use SSH key to sign commits and tags
[gpg]
# Use SSH key to sign commits and tags
format = ssh

# Self-define SSH keys that should be considered authentic locally
[gpg "ssh"]
# Self-define SSH keys that should be considered authentic locally
allowedSignersFile = ~/.config/git/allowed-signatures


## ------ Git Behaviour ------ ##
# --- Git Behaviour

[init]
# scripts and hooks to add when creating a new local Git repository
Expand Down Expand Up @@ -60,18 +62,24 @@
# Automatically sign every tag
gpgsign = true

[fetch]
# Remove deleted remote branches from local repository
prune = true

# --- Diff & Merge

[diff]
# Neovim diff tool
tool = nvimdiff

[difftool "nvimdiff"]
prompt = false


# [difftool "meld"]
# prompt = false

# [difftool "meld"]
# cmd = meld \"$LOCAL\" \"$REMOTE\"
# path =


[merge]
# Include common parent when merge conflicts arise
conflictstyle = diff3
Expand All @@ -80,12 +88,3 @@
# cmd = meld \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
# trustExitCode = true


[log]
abbrevCommit = true

[push]
# Set local brach to track new remote branch automatically
# Requires Git 2.37.0
autoSetupRemote = true

0 comments on commit 90288ea

Please sign in to comment.