dots/.gitaliases
Yongmin Hong d5b6e05a86
gitalias: add more rules
Summary:
 - add !command in correct sections to prevent mistakes
 - alphabetize
 - `diffs` for `diff --staged`
 - `prod` to quick deploy to `prod` branch for some repos.
 - `staash` for `stash -a`

also:
 - add `max_line_length: 80` to editorconfig
 - autofix `TXT1` rule for `.arclint`
 - `rerere.autoUpdate = tru` for `gitconfig`
 - add prettier
 - fix nfty.yml
 - add `.yamllint` config

Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: I think there isn't?

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D211
2024-06-08 16:31:19 +09:00

57 lines
1.6 KiB
Text

# Copyright (C) 2017 Hong Yongmin <https://revi.xyz>
# SPDX-License-Identifier: Apache-2.0
[alias]
# some project uses `master` and some uses `main` for the default.
# since their first two letters are both ma, use the last char
# which is either `r` for master or `n` for main.
# a-d
# a-l
# a-p
# a-w
aal = add *
acm = commit -a -s
amend = commit --amend
amends = commit --amend -s
amendss = commit --amend -S -s
# arcd
# arcl
# arcp
# arcw
br = branch -v
brd = branch -d
brD = branch -D
cm = commit -s
cmt = commit -S -s
co = checkout
cob = checkout -b
com = !echo 'ERROR: use cor for master, and con for main.'
comn = checkout main
comr = checkout master
count = count-objects -vH
diffs = diff --staged
fa = fetch --all
fo = fetch origin
fup = fetch upstream
graph = log --pretty=format:\"%h %s\" --graph
osync = !echo 'ERROR: use osyncr for master, and osyncm for main.'
osyncn = rebase origin/main
osyncr = rebase origin/master
po= !echo 'ERROR: use por for master, and pon for main.'
pon = push origin main
por = push origin master
prod = !git checkout prod && git rebase origin/master && git push origin prod && git checkout master
st = status
staash = stash -a
usync = !echo 'ERROR: use usyncr for master, and usyncn for main.'
usyncn = rebase upstream/main
usyncr = rebase upstream/master
# below are non-git command, signified via `!` in the comment
# https://issuetracker.revi.xyz/u/gitalias
a-d = !arc diff
arcd = !arc diff
a-l = !arc land
arcl = !arc land
a-p = !arc patch
arcp = !arc patch
a-w = !arc work
arcw = !arc work