diff --git a/.config/git/config b/.config/git/config index 5eb7ac8..e105a5b 100644 --- a/.config/git/config +++ b/.config/git/config @@ -103,5 +103,17 @@ # Show most recently changed branches first. 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] path = ~/.config/git/config.local diff --git a/.config/git/config.aliases b/.config/git/config.aliases index e775f75..b36db7b 100644 --- a/.config/git/config.aliases +++ b/.config/git/config.aliases @@ -78,7 +78,12 @@ mtl = mergetool --no-prompt ma = merge --abort - # History Manipulation - - - - - - - - - - - - - - - - - - - - - - - - - - - - + cp = cherry-pick + cpa = cherry-pick --abort + cpc = cherry-pick --continue + cpq = cherry-pick --quit + + # Remotes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - p = push pv = push -v @@ -94,6 +99,9 @@ pl = pull plr = pull --rebase + sub = submodule + subu = submodule update --init --recursive + # Logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Current branch. @@ -116,6 +124,8 @@ nevermind = "!git reset --hard HEAD && git clean -df" + open = "!f() { URL=$(git config remote.${1:-origin}.url); xdg-open \"${URL%%.git}\"; }; f" + # Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # A note on reset, restore, and revert, paraphrased from `man git`, plus myown