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 <revi@omglol.email>

Test Plan: try the commands.

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D354
This commit is contained in:
revi 2024-06-18 17:39:21 +09:00
parent a7cd00f7a6
commit fed68e7597
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
2 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,10 @@
diffs = diff --staged diffs = diff --staged
fa = fetch --all fa = fetch --all
fo = fetch origin fo = fetch origin
fpush = push --force-with-lease
fup = fetch upstream fup = fetch upstream
gon = !git fup && git comn && git usyncn
gor = !git fup && git comr && git usyncr
graph = log --pretty=format:\"%h %s\" --graph graph = log --pretty=format:\"%h %s\" --graph
osync = !echo 'ERROR: use osyncr for master, and osyncm for main.' osync = !echo 'ERROR: use osyncr for master, and osyncm for main.'
osyncn = rebase origin/main osyncn = rebase origin/main
@ -40,6 +43,8 @@
pon = push origin main pon = push origin main
por = push origin master por = push origin master
prod = !git checkout prod && git rebase origin/master && git push origin prod && git checkout 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 st = status
staash = stash -a staash = stash -a
usync = !echo 'ERROR: use usyncr for master, and usyncn for main.' usync = !echo 'ERROR: use usyncr for master, and usyncn for main.'

View file

@ -36,8 +36,8 @@
defaultBranch = master defaultBranch = master
[log] [log]
date = iso8601 date = iso8601
[pretty] [push]
show = fuller gpgSign = if-asked
[rerere] [rerere]
enabled = true enabled = true
autoUpdate = true autoUpdate = true
@ -48,5 +48,6 @@
smtpencryption = ssl smtpencryption = ssl
smtpserverport = 465 smtpserverport = 465
smtpAuth = 'PLAIN' smtpAuth = 'PLAIN'
smtpReloginDelay = 60
[tag] [tag]
forceSignAnnotated = true forceSignAnnotated = true