diff options
Diffstat (limited to '.config/git')
| -rw-r--r-- | .config/git/config | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/.config/git/config b/.config/git/config index b16e8c3..631a82a 100644 --- a/.config/git/config +++ b/.config/git/config @@ -16,6 +16,14 @@ multiEdit = true confirm = always +[credential "git.sr.ht"] + username = robertgzr + helper = !sh -c 'pass sr.ht/robertgzr | xargs printf "password=%s\n"' + +[credential "github.com"] + username = robertgzr + helper = !sh -c 'pass github.com/robertgzr | xargs printf "password=%s\n"' + [credential "smtp://mail.gandi.net:465"] username = robert@gnzler.io helper = !sh -c 'pass email/gnzler.io | xargs printf "password=%s\n"' @@ -83,8 +91,9 @@ total-lines = "! git ls-tree -r master --name-only | xargs -I {} git blame --line-porcelain {} | sed -n 's/^author //p' | sort | uniq -c | sort -rn" fixup = "!f() { git commit --fixup=${1}; }; f" squash = "!f() { git commit --squash=${1}; }; f" - rbi = rebase --autosquash -i - rbi-pr = !bash -c 'git rebase --autosquash -i `git merge-base HEAD ${1:-origin/master}`' + r = rebase + ri = rebase --autosquash -i + ri-pr = !bash -c 'git rebase --autosquash -i `git merge-base HEAD ${1:-origin/master}`' pushf = push --force-with-lease root = "rev-parse --show-toplevel" trailer = "!f() { trailer=${1:-}; ref=${2:-HEAD}; mode='--amend'; [ $ref != 'HEAD' ] && mode='--fixup=$ref'; msg=$(git rev-parse --show-toplevel)/LAST_COMMIT_MSG; git log -1 --format=%B $ref > $msg; git interpret-trailers --in-place --trailer $trailer $msg; git commit --allow-empty --no-verify --only --edit --file $msg $mode; rm $msg; }; f" |