🔧 feat(git): Tweak gitconfig

This commit is contained in:
punkfairie 2024-03-03 13:29:19 -08:00
parent 74669ba6b1
commit 844eaf2130
Signed by: punkfairie
GPG key ID: A86AF57F837E320F
2 changed files with 23 additions and 1 deletions

View file

@ -103,5 +103,17 @@
# Show most recently changed branches first. # Show most recently changed branches first.
sort = -committerdate sort = -committerdate
[url "git@github.com:"]
insteadOf = @gh:
[url "aur@aur.archlinux.org"]
insteadOf = @aur:
[url "https://github.com/"]
insteadOf = gh://
[url "https://aur.archlinux.org/"]
insteadOf = aur://
[include] [include]
path = ~/.config/git/config.local path = ~/.config/git/config.local

View file

@ -78,7 +78,12 @@
mtl = mergetool --no-prompt mtl = mergetool --no-prompt
ma = merge --abort ma = merge --abort
# History Manipulation - - - - - - - - - - - - - - - - - - - - - - - - - - - - cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
cpq = cherry-pick --quit
# Remotes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p = push p = push
pv = push -v pv = push -v
@ -94,6 +99,9 @@
pl = pull pl = pull
plr = pull --rebase plr = pull --rebase
sub = submodule
subu = submodule update --init --recursive
# Logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Current branch. # Current branch.
@ -116,6 +124,8 @@
nevermind = "!git reset --hard HEAD && git clean -df" nevermind = "!git reset --hard HEAD && git clean -df"
open = "!f() { URL=$(git config remote.${1:-origin}.url); xdg-open \"${URL%%.git}\"; }; f"
# Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# A note on reset, restore, and revert, paraphrased from `man git`, plus myown # A note on reset, restore, and revert, paraphrased from `man git`, plus myown