This commit is contained in:
Mariano Z. 2025-04-21 12:07:24 -03:00
commit b4cdb80b5c
Signed by: marianozunino
GPG key ID: 4C73BAD25156DACE
137 changed files with 6383 additions and 0 deletions

29
git/.config/git/commit.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
get_ticket_number() {
git symbolic-ref --short HEAD | grep -Ei '^ocst-[0-9]{2,5}-' | sed -E 's/^(ocst-[0-9]{2,5}).*$/\1/i' | tr '[:upper:]' '[:lower:]'
}
format_commit_message() {
local message="$1"
local ticket="$2"
if echo "$message" | grep -E '^[^:]+:' >/dev/null; then
local type=$(echo "$message" | cut -d: -f1)
local content=$(echo "$message" | cut -d: -f2- | sed 's/^ //')
echo "$type($ticket): $content"
else
echo "$message"
fi
}
main() {
local ticket=$(get_ticket_number)
if [ -n "$ticket" ]; then
git commit -m "$(format_commit_message "$1" "$ticket")" "${@:2}"
else
git commit -m "$1" "${@:2}"
fi
}
main "$@"

82
git/.config/git/config Normal file
View file

@ -0,0 +1,82 @@
# GitFlow related sections
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
bugfix = bugfix/
support = support/
versiontag = v
[user]
email = marianoz@posteo.net
name = Mariano Z.
signingkey = 13D35660EC8E8AA03D4370A83FA93CB876C8FFAA
[include]
path = ~/.config/git/gitalias.txt
[core]
pager = diff-so-fancy | less --tabs=4 -RFX
autocrlf = input
excludesfile = ~/.config/git/.gitignore
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[credential]
helper = /usr/lib/git-core/git-credential-libsecret
[mergetool "fugitive"]
cmd = vim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
#cmd = vim -f -c \"Gvdiffsplit!\" \"$MERGED\"
[merge]
tool = fugitive
conflictStyle = diff3
[icdiff]
options = --highlight --line-numbers
#
[pull]
rebase = true
[rebase]
autoStash = true
[init]
defaultBranch = master
[push]
autoSetupRemote = true
# avoid issues where the `cargo audit` command tries to clone from a repo you do not have WRITE access to.
# we already use SSH for every github repo, and so this puts the clone back to using HTTPS.
[url "https://github.com/RustSec/advisory-db"]
insteadOf = https://github.com/RustSec/advisory-db
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[color "blame"]
highlightRecent = 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226
[commit]
gpgsign = true
[alias]
bb = !better-git-branch.sh
[includeIf "gitdir:~/Sync/"]
path = ~/Sync/Obsidian/.gitconfig

1513
git/.config/git/gitalias.txt Normal file

File diff suppressed because it is too large Load diff