From fed68e75979d13536b9bf5ee265f7330817210bb Mon Sep 17 00:00:00 2001 From: Yongmin Hong Date: Tue, 18 Jun 2024 17:39:21 +0900 Subject: [PATCH] gitconfig: more aliases and small config tweak Summary: - `fpush` `--force-with-lease` for safer `--force` - Quick upstream sync with `gon` (main) or `gor` (master) - `spop` for `stash pop` - `sshow` for `show --show-signature` Signed-off-by: Yongmin Hong Test Plan: try the commands. Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D354 --- .gitaliases | 5 +++++ default.gitconfig | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitaliases b/.gitaliases index 8ae5049..5357ac0 100644 --- a/.gitaliases +++ b/.gitaliases @@ -31,7 +31,10 @@ diffs = diff --staged fa = fetch --all fo = fetch origin + fpush = push --force-with-lease fup = fetch upstream + gon = !git fup && git comn && git usyncn + gor = !git fup && git comr && git usyncr graph = log --pretty=format:\"%h %s\" --graph osync = !echo 'ERROR: use osyncr for master, and osyncm for main.' osyncn = rebase origin/main @@ -40,6 +43,8 @@ pon = push origin main por = push origin master prod = !git checkout prod && git rebase origin/master && git push origin prod && git checkout master + spop = stash pop + sshow = show --show-signature st = status staash = stash -a usync = !echo 'ERROR: use usyncr for master, and usyncn for main.' diff --git a/default.gitconfig b/default.gitconfig index a3c9bb0..c478e34 100644 --- a/default.gitconfig +++ b/default.gitconfig @@ -36,8 +36,8 @@ defaultBranch = master [log] date = iso8601 -[pretty] - show = fuller +[push] + gpgSign = if-asked [rerere] enabled = true autoUpdate = true @@ -48,5 +48,6 @@ smtpencryption = ssl smtpserverport = 465 smtpAuth = 'PLAIN' + smtpReloginDelay = 60 [tag] forceSignAnnotated = true