summary refs log tree commit diff
path: root/.config/git
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-01-21 19:33:10 +0100
committerRobert Günzler <r@gnzler.io>2021-01-21 19:40:20 +0100
commit72c39240811f1def43fca71de51566d206f7728d (patch)
treea33aa1331fc55b587a243f64ef94d781df40a8ae /.config/git
parent0762801ed9627021e732cdeb225a737f44e3df42 (diff)
Update 2021-01-21T18:33:10Z
Diffstat (limited to '.config/git')
-rw-r--r--.config/git/config13
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"