gitalias: do not assume master as universal default branch

Summary:
Since around 2020, `main` has gained traction but not everyone has followed suit, so move master-tracking commands to make way for disambig command.

This will let me select my own default primary branch that is neither main nor master.

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

Test Plan: `sh deploy.sh` then try `git com`.

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D68
This commit is contained in:
revi 2024-05-10 18:10:01 +09:00
parent 30c04e1cb6
commit fbd4a63e03
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94

View file

@ -6,21 +6,27 @@
fa = fetch --all fa = fetch --all
graph = log --pretty=format:\"%h %s\" --graph graph = log --pretty=format:\"%h %s\" --graph
fo = fetch origin fo = fetch origin
usync = rebase upstream/master # some project uses `master` and some uses `main` for the default.
usyncm = rebase upstream/main # since their first two letters are both ma, use the last char.
osync = rebase origin/master usync = !echo 'ERROR: use usyncr for master, and usyncn for main.'
usyncr = rebase upstream/master
usyncn = rebase upstream/main
osync = !echo 'ERROR: use osyncr for master, and osyncm for main.'
osyncr = rebase origin/master
osyncm = rebase origin/main osyncm = rebase origin/main
aal = add * aal = add *
po = push origin master po= !echo 'ERROR: use por for master, and pon for main.'
pom = push origin main por = push origin master
pon = push origin main
amend = commit --amend -s amend = commit --amend -s
cmt = commit -S -s cmt = commit -S -s
amends = commit --amend -S -s amends = commit --amend -S -s
acmt = commit -a -S -s acmt = commit -a -S -s
acm = commit -a -s acm = commit -a -s
fup = fetch upstream fup = fetch upstream
com = checkout master com = !echo 'ERROR: use cor for master, and con for main.'
comm = checkout main comr = checkout master
comn = checkout main
por = push origin por = push origin
cob = checkout -b cob = checkout -b
# below are non-git command, signified via `!` in the comment # below are non-git command, signified via `!` in the comment