Update dotfiles/.gitconfig, dotfiles/.local/git-templates/hooks/post-commit
This commit is contained in:
parent
71966f69e2
commit
ea5d1cc10a
2 changed files with 11 additions and 0 deletions
|
@ -52,6 +52,8 @@
|
||||||
prompt = false
|
prompt = false
|
||||||
[credential]
|
[credential]
|
||||||
helper = cache --timeout=3600
|
helper = cache --timeout=3600
|
||||||
|
[init]
|
||||||
|
templatedir = /Users/bzalewski/.local/git-templates
|
||||||
[interactive]
|
[interactive]
|
||||||
diffFilter = delta --color-only --features=interactive
|
diffFilter = delta --color-only --features=interactive
|
||||||
[merge]
|
[merge]
|
||||||
|
|
9
dotfiles/.local/git-templates/hooks/post-commit
Normal file
9
dotfiles/.local/git-templates/hooks/post-commit
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### git-stats hook (begin) ###
|
||||||
|
# Copy last commit hash to clipboard on commit
|
||||||
|
commit_hash=$(git rev-parse HEAD)
|
||||||
|
repo_url=$(git config --get remote.origin.url)
|
||||||
|
commit_date=$(git log -1 --format=%cd)
|
||||||
|
commit_data="\"{ \"date\": \"$commit_date\", \"url\": \"$repo_url\", \"hash\": \"$commit_hash\" }\""
|
||||||
|
git-stats --record "${commit_data}"
|
||||||
|
### git-stats hook (end) ###
|
Loading…
Reference in a new issue