This commit is contained in:
Marc Beninca 2024-11-18 14:39:06 +01:00
parent aceca1fc69
commit 92010392ae
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -8,16 +8,16 @@ C %C(blue)%cn %ce
%B" %B"
# add to index # add to index
ga() { sh_alias__git_add "${@}"; } ga() { sh_a__git_add "${@}"; }
sh_alias__git_add() { sh_a__git_add() {
git \ git \
add \ add \
"${@}" "${@}"
} }
# add all to index # add all to index
gaa() { sh_alias__git_add_all "${@}"; } gaa() { sh_a__git_add_all "${@}"; }
sh_alias__git_add_all() { sh_a__git_add_all() {
git \ git \
add \ add \
--all \ --all \
@ -25,8 +25,8 @@ sh_alias__git_add_all() {
} }
# add parts of all to index # add parts of all to index
gaap() { sh_alias__git_add_all_patch "${@}"; } gaap() { sh_a__git_add_all_patch "${@}"; }
sh_alias__git_add_all_patch() { sh_a__git_add_all_patch() {
git \ git \
add \ add \
--all \ --all \
@ -35,8 +35,8 @@ sh_alias__git_add_all_patch() {
} }
# add parts to index # add parts to index
gap() { sh_alias__git_add_patch "${@}"; } gap() { sh_a__git_add_patch "${@}"; }
sh_alias__git_add_patch() { sh_a__git_add_patch() {
git \ git \
add \ add \
--patch \ --patch \
@ -44,16 +44,16 @@ sh_alias__git_add_patch() {
} }
# create a branch # create a branch
gb() { sh_alias__git_branch "${@}"; } gb() { sh_a__git_branch "${@}"; }
sh_alias__git_branch() { sh_a__git_branch() {
git \ git \
branch \ branch \
"${@}" "${@}"
} }
# delete a branch # delete a branch
gbd() { sh_alias__git_branch_delete "${@}"; } gbd() { sh_a__git_branch_delete "${@}"; }
sh_alias__git_branch_delete() { sh_a__git_branch_delete() {
git \ git \
branch \ branch \
--delete \ --delete \
@ -61,8 +61,8 @@ sh_alias__git_branch_delete() {
} }
# force a branch deletion # force a branch deletion
gbdf() { sh_alias__git_branch_delete_force "${@}"; } gbdf() { sh_a__git_branch_delete_force "${@}"; }
sh_alias__git_branch_delete_force() { sh_a__git_branch_delete_force() {
git \ git \
branch \ branch \
--delete \ --delete \
@ -71,8 +71,8 @@ sh_alias__git_branch_delete_force() {
} }
# list branches # list branches
gbl() { sh_alias__git_branch_list "${@}"; } gbl() { sh_a__git_branch_list "${@}"; }
sh_alias__git_branch_list() { sh_a__git_branch_list() {
git \ git \
branch \ branch \
--all \ --all \
@ -83,8 +83,8 @@ sh_alias__git_branch_list() {
} }
# set the link to a remote branch from a local branch # set the link to a remote branch from a local branch
gbsu() { sh_alias__git_branch_set_upstream "${@}"; } gbsu() { sh_a__git_branch_set_upstream "${@}"; }
sh_alias__git_branch_set_upstream() { sh_a__git_branch_set_upstream() {
git \ git \
branch \ branch \
--set-upstream-to \ --set-upstream-to \
@ -92,16 +92,16 @@ sh_alias__git_branch_set_upstream() {
} }
# switch to a branch or checkout file(s) from a commit # switch to a branch or checkout file(s) from a commit
gc() { sh_alias__git_checkout "${@}"; } gc() { sh_a__git_checkout "${@}"; }
sh_alias__git_checkout() { sh_a__git_checkout() {
git \ git \
checkout \ checkout \
"${@}" "${@}"
} }
# checkout an orphan branch # checkout an orphan branch
gco() { sh_alias__git_checkout_orphan "${@}"; } gco() { sh_a__git_checkout_orphan "${@}"; }
sh_alias__git_checkout_orphan() { sh_a__git_checkout_orphan() {
git \ git \
checkout \ checkout \
--orphan \ --orphan \
@ -109,16 +109,16 @@ sh_alias__git_checkout_orphan() {
} }
# pick a commit # pick a commit
gcp() { sh_alias__git_cherry_pick "${@}"; } gcp() { sh_a__git_cherry_pick "${@}"; }
sh_alias__git_cherry_pick() { sh_a__git_cherry_pick() {
git \ git \
cherry-pick \ cherry-pick \
"${@}" "${@}"
} }
# abort the commit pick # abort the commit pick
gcpa() { sh_alias__git_cherry_pick_abort "${@}"; } gcpa() { sh_a__git_cherry_pick_abort "${@}"; }
sh_alias__git_cherry_pick_abort() { sh_a__git_cherry_pick_abort() {
git \ git \
cherry-pick \ cherry-pick \
--abort \ --abort \
@ -126,8 +126,8 @@ sh_alias__git_cherry_pick_abort() {
} }
# continue the commit pick # continue the commit pick
gcpc() { sh_alias__git_cherry_pick_continue "${@}"; } gcpc() { sh_a__git_cherry_pick_continue "${@}"; }
sh_alias__git_cherry_pick_continue() { sh_a__git_cherry_pick_continue() {
git \ git \
cherry-pick \ cherry-pick \
--continue \ --continue \
@ -135,8 +135,8 @@ sh_alias__git_cherry_pick_continue() {
} }
# clean untracked files # clean untracked files
gcf() { sh_alias__git_clean_force "${@}"; } gcf() { sh_a__git_clean_force "${@}"; }
sh_alias__git_clean_force() { sh_a__git_clean_force() {
git \ git \
clean \ clean \
-d \ -d \
@ -145,8 +145,8 @@ sh_alias__git_clean_force() {
} }
# redo the last commit with a different message # redo the last commit with a different message
gcam() { sh_alias__git_commit_amend_message "${@}"; } gcam() { sh_a__git_commit_amend_message "${@}"; }
sh_alias__git_commit_amend_message() { sh_a__git_commit_amend_message() {
git \ git \
commit \ commit \
--amend \ --amend \
@ -155,8 +155,8 @@ sh_alias__git_commit_amend_message() {
} }
# make a root commit # make a root commit
gcem() { sh_alias__git_commit_empty_message "${@}"; } gcem() { sh_a__git_commit_empty_message "${@}"; }
sh_alias__git_commit_empty_message() { sh_a__git_commit_empty_message() {
git \ git \
commit \ commit \
--allow-empty \ --allow-empty \
@ -166,8 +166,8 @@ sh_alias__git_commit_empty_message() {
} }
# commit the index # commit the index
gcm() { sh_alias__git_commit_message "${@}"; } gcm() { sh_a__git_commit_message "${@}"; }
sh_alias__git_commit_message() { sh_a__git_commit_message() {
git \ git \
commit \ commit \
--message \ --message \
@ -175,8 +175,8 @@ sh_alias__git_commit_message() {
} }
# configure the user email # configure the user email
gcue() { sh_alias__git_config_user_email "${@}"; } gcue() { sh_a__git_config_user_email "${@}"; }
sh_alias__git_config_user_email() { sh_a__git_config_user_email() {
git \ git \
config \ config \
"user.email" \ "user.email" \
@ -184,8 +184,8 @@ sh_alias__git_config_user_email() {
} }
# configure the user name # configure the user name
gcun() { sh_alias__git_config_user_name "${@}"; } gcun() { sh_a__git_config_user_name "${@}"; }
sh_alias__git_config_user_name() { sh_a__git_config_user_name() {
git \ git \
config \ config \
"user.name" \ "user.name" \
@ -193,16 +193,16 @@ sh_alias__git_config_user_name() {
} }
# differences from last or between commits # differences from last or between commits
gd() { sh_alias__git_diff "${@}"; } gd() { sh_a__git_diff "${@}"; }
sh_alias__git_diff() { sh_a__git_diff() {
git \ git \
diff \ diff \
"${@}" "${@}"
} }
# display what is indexed in cache # display what is indexed in cache
gdc() { sh_alias__git_diff_cached "${@}"; } gdc() { sh_a__git_diff_cached "${@}"; }
sh_alias__git_diff_cached() { sh_a__git_diff_cached() {
git \ git \
diff \ diff \
--cached \ --cached \
@ -210,8 +210,8 @@ sh_alias__git_diff_cached() {
} }
# indexed character-level differences # indexed character-level differences
gdcw() { sh_alias__git_diff_cached_word "${@}"; } gdcw() { sh_a__git_diff_cached_word "${@}"; }
sh_alias__git_diff_cached_word() { sh_a__git_diff_cached_word() {
git \ git \
diff \ diff \
--cached \ --cached \
@ -220,8 +220,8 @@ sh_alias__git_diff_cached_word() {
} }
# differences via external tool # differences via external tool
gdt() { sh_alias__git_diff_tool "${@}"; } gdt() { sh_a__git_diff_tool "${@}"; }
sh_alias__git_diff_tool() { sh_a__git_diff_tool() {
git \ git \
difftool \ difftool \
--dir-diff \ --dir-diff \
@ -229,8 +229,8 @@ sh_alias__git_diff_tool() {
} }
# character-level differences # character-level differences
gdw() { sh_alias__git_diff_word "${@}"; } gdw() { sh_a__git_diff_word "${@}"; }
sh_alias__git_diff_word() { sh_a__git_diff_word() {
git \ git \
diff \ diff \
--word-diff-regex "." \ --word-diff-regex "." \
@ -238,8 +238,8 @@ sh_alias__git_diff_word() {
} }
# fetch from the remote repository # fetch from the remote repository
gf() { sh_alias__git_fetch "${@}"; } gf() { sh_a__git_fetch "${@}"; }
sh_alias__git_fetch() { sh_a__git_fetch() {
git \ git \
fetch \ fetch \
--tags \ --tags \
@ -248,16 +248,16 @@ sh_alias__git_fetch() {
} }
# fetch from remote repository and prune local orphan branches # fetch from remote repository and prune local orphan branches
gfp() { sh_alias__git_fetch_prune "${@}"; } gfp() { sh_a__git_fetch_prune "${@}"; }
sh_alias__git_fetch_prune() { sh_a__git_fetch_prune() {
sh_alias__git_fetch \ sh_a__git_fetch \
--prune \ --prune \
"${@}" "${@}"
} }
# garbage collect all orphan commits # garbage collect all orphan commits
ggc() { sh_alias__git_garbage_collect "${@}"; } ggc() { sh_a__git_garbage_collect "${@}"; }
sh_alias__git_garbage_collect() { sh_a__git_garbage_collect() {
git \ git \
reflog \ reflog \
expire \ expire \
@ -270,16 +270,16 @@ sh_alias__git_garbage_collect() {
} }
# initialize a new repository # initialize a new repository
gi() { sh_alias__git_init "${@}"; } gi() { sh_a__git_init "${@}"; }
sh_alias__git_init() { sh_a__git_init() {
git \ git \
init \ init \
"${@}" "${@}"
} }
# initialize a new bare repository # initialize a new bare repository
gib() { sh_alias__git_init_bare "${@}"; } gib() { sh_a__git_init_bare "${@}"; }
sh_alias__git_init_bare() { sh_a__git_init_bare() {
git \ git \
init \ init \
--bare \ --bare \
@ -287,8 +287,8 @@ sh_alias__git_init_bare() {
} }
# log history # log history
gl() { sh_alias__git_log "${@}"; } gl() { sh_a__git_log "${@}"; }
sh_alias__git_log() { sh_a__git_log() {
git \ git \
log \ log \
--abbrev=8 \ --abbrev=8 \
@ -299,33 +299,33 @@ sh_alias__git_log() {
} }
# log all history # log all history
gla() { sh_alias__git_log_all "${@}"; } gla() { sh_a__git_log_all "${@}"; }
sh_alias__git_log_all() { sh_a__git_log_all() {
sh_alias__git_log \ sh_a__git_log \
--all \ --all \
"${@}" "${@}"
} }
# log all history with patches # log all history with patches
glap() { sh_alias__git_log_all_patch "${@}"; } glap() { sh_a__git_log_all_patch "${@}"; }
sh_alias__git_log_all_patch() { sh_a__git_log_all_patch() {
sh_alias__git_log \ sh_a__git_log \
--all \ --all \
--patch \ --patch \
"${@}" "${@}"
} }
# log history with patches # log history with patches
glp() { sh_alias__git_log_patch "${@}"; } glp() { sh_a__git_log_patch "${@}"; }
sh_alias__git_log_patch() { sh_a__git_log_patch() {
sh_alias__git_log \ sh_a__git_log \
--patch \ --patch \
"${@}" "${@}"
} }
# fast-forward merge to remote branch # fast-forward merge to remote branch
gm() { sh_alias__git_merge "${@}"; } gm() { sh_a__git_merge "${@}"; }
sh_alias__git_merge() { sh_a__git_merge() {
git \ git \
merge \ merge \
--ff-only \ --ff-only \
@ -333,8 +333,8 @@ sh_alias__git_merge() {
} }
# abort the current merge commit # abort the current merge commit
gma() { sh_alias__git_merge_abort "${@}"; } gma() { sh_a__git_merge_abort "${@}"; }
sh_alias__git_merge_abort() { sh_a__git_merge_abort() {
git \ git \
merge \ merge \
--abort \ --abort \
@ -342,8 +342,8 @@ sh_alias__git_merge_abort() {
} }
# do a merge commit # do a merge commit
gmc() { sh_alias__git_merge_commit "${@}"; } gmc() { sh_a__git_merge_commit "${@}"; }
sh_alias__git_merge_commit() { sh_a__git_merge_commit() {
git \ git \
merge \ merge \
--no-ff \ --no-ff \
@ -352,8 +352,8 @@ sh_alias__git_merge_commit() {
} }
# squash a branch and index its modifications # squash a branch and index its modifications
gms() { sh_alias__git_merge_squash "${@}"; } gms() { sh_a__git_merge_squash "${@}"; }
sh_alias__git_merge_squash() { sh_a__git_merge_squash() {
git \ git \
merge \ merge \
--squash \ --squash \
@ -361,16 +361,16 @@ sh_alias__git_merge_squash() {
} }
# merge via external tool # merge via external tool
gmt() { sh_alias__git_merge_tool "${@}"; } gmt() { sh_a__git_merge_tool "${@}"; }
sh_alias__git_merge_tool() { sh_a__git_merge_tool() {
git \ git \
mergetool \ mergetool \
"${@}" "${@}"
} }
# push to the remote repository # push to the remote repository
gp() { sh_alias__git_push "${@}"; } gp() { sh_a__git_push "${@}"; }
sh_alias__git_push() { sh_a__git_push() {
git \ git \
push \ push \
--tags \ --tags \
@ -379,8 +379,8 @@ sh_alias__git_push() {
} }
# delete from the remote repository # delete from the remote repository
gpd() { sh_alias__git_push_delete "${@}"; } gpd() { sh_a__git_push_delete "${@}"; }
sh_alias__git_push_delete() { sh_a__git_push_delete() {
git \ git \
push \ push \
--delete \ --delete \
@ -388,24 +388,24 @@ sh_alias__git_push_delete() {
} }
# force the push to the remote repository # force the push to the remote repository
gpf() { sh_alias__git_push_force "${@}"; } gpf() { sh_a__git_push_force "${@}"; }
sh_alias__git_push_force() { sh_a__git_push_force() {
sh_alias__git_push \ sh_a__git_push \
--force \ --force \
"${@}" "${@}"
} }
# rebase current branch onto another # rebase current branch onto another
grb() { sh_alias__git_re_base "${@}"; } grb() { sh_a__git_re_base "${@}"; }
sh_alias__git_re_base() { sh_a__git_re_base() {
git \ git \
rebase \ rebase \
"${@}" "${@}"
} }
# abort current rebase # abort current rebase
grba() { sh_alias__git_re_base_abort "${@}"; } grba() { sh_a__git_re_base_abort "${@}"; }
sh_alias__git_re_base_abort() { sh_a__git_re_base_abort() {
git \ git \
rebase \ rebase \
--abort \ --abort \
@ -413,8 +413,8 @@ sh_alias__git_re_base_abort() {
} }
# continue current rebase # continue current rebase
grbc() { sh_alias__git_re_base_continue "${@}"; } grbc() { sh_a__git_re_base_continue "${@}"; }
sh_alias__git_re_base_continue() { sh_a__git_re_base_continue() {
git \ git \
rebase \ rebase \
--continue \ --continue \
@ -422,8 +422,8 @@ sh_alias__git_re_base_continue() {
} }
# force rebase without fast-forward # force rebase without fast-forward
grbf() { sh_alias__git_re_base_force "${@}"; } grbf() { sh_a__git_re_base_force "${@}"; }
sh_alias__git_re_base_force() { sh_a__git_re_base_force() {
git \ git \
rebase \ rebase \
--force-rebase \ --force-rebase \
@ -431,8 +431,8 @@ sh_alias__git_re_base_force() {
} }
# rebase interactively # rebase interactively
grbi() { sh_alias__git_re_base_interactive "${@}"; } grbi() { sh_a__git_re_base_interactive "${@}"; }
sh_alias__git_re_base_interactive() { sh_a__git_re_base_interactive() {
git \ git \
rebase \ rebase \
--interactive \ --interactive \
@ -440,8 +440,8 @@ sh_alias__git_re_base_interactive() {
} }
# add a new remote repository # add a new remote repository
grma() { sh_alias__git_re_mote_add "${@}"; } grma() { sh_a__git_re_mote_add "${@}"; }
sh_alias__git_re_mote_add() { sh_a__git_re_mote_add() {
git \ git \
remote \ remote \
add \ add \
@ -449,8 +449,8 @@ sh_alias__git_re_mote_add() {
} }
# list remote repositories # list remote repositories
grml() { sh_alias__git_re_mote_list "${@}"; } grml() { sh_a__git_re_mote_list "${@}"; }
sh_alias__git_re_mote_list() { sh_a__git_re_mote_list() {
git \ git \
remote \ remote \
--verbose \ --verbose \
@ -458,8 +458,8 @@ sh_alias__git_re_mote_list() {
} }
# set the location of a remote repository # set the location of a remote repository
grmsu() { sh_alias__git_re_mote_set_upstream "${@}"; } grmsu() { sh_a__git_re_mote_set_upstream "${@}"; }
sh_alias__git_re_mote_set_upstream() { sh_a__git_re_mote_set_upstream() {
git \ git \
remote \ remote \
set-url \ set-url \
@ -467,8 +467,8 @@ sh_alias__git_re_mote_set_upstream() {
} }
# show connection to a remote repository # show connection to a remote repository
grms() { sh_alias__git_re_mote_show "${@}"; } grms() { sh_a__git_re_mote_show "${@}"; }
sh_alias__git_re_mote_show() { sh_a__git_re_mote_show() {
git \ git \
remote \ remote \
show \ show \
@ -476,24 +476,24 @@ sh_alias__git_re_mote_show() {
} }
# remove and add removal to index # remove and add removal to index
grm() { sh_alias__git_re_move "${@}"; } grm() { sh_a__git_re_move "${@}"; }
sh_alias__git_re_move() { sh_a__git_re_move() {
git \ git \
rm \ rm \
"${@}" "${@}"
} }
# remove file(s) from index or move current branch pointer # remove file(s) from index or move current branch pointer
grs() { sh_alias__git_re_set "${@}"; } grs() { sh_a__git_re_set "${@}"; }
sh_alias__git_re_set() { sh_a__git_re_set() {
git \ git \
reset \ reset \
"${@}" "${@}"
} }
# wipe modifications or reset current branch to another commit # wipe modifications or reset current branch to another commit
grsh() { sh_alias__git_re_set_hard "${@}"; } grsh() { sh_a__git_re_set_hard "${@}"; }
sh_alias__git_re_set_hard() { sh_a__git_re_set_hard() {
git \ git \
reset \ reset \
--hard \ --hard \
@ -501,16 +501,16 @@ sh_alias__git_re_set_hard() {
} }
# show a commit # show a commit
gsc() { sh_alias__git_show_commit "${@}"; } gsc() { sh_a__git_show_commit "${@}"; }
sh_alias__git_show_commit() { sh_a__git_show_commit() {
git \ git \
show \ show \
"${@}" "${@}"
} }
# current state of repository # current state of repository
gs() { sh_alias__git_status "${@}"; } gs() { sh_a__git_status "${@}"; }
sh_alias__git_status() { sh_a__git_status() {
git \ git \
status \ status \
--untracked-files="all" \ --untracked-files="all" \
@ -518,16 +518,16 @@ sh_alias__git_status() {
} }
# tag a commit # tag a commit
gt() { sh_alias__git_tag "${@}"; } gt() { sh_a__git_tag "${@}"; }
sh_alias__git_tag() { sh_a__git_tag() {
git \ git \
tag \ tag \
"${@}" "${@}"
} }
# delete a tag # delete a tag
gtd() { sh_alias__git_tag_delete "${@}"; } gtd() { sh_a__git_tag_delete "${@}"; }
sh_alias__git_tag_delete() { sh_a__git_tag_delete() {
git \ git \
tag \ tag \
--delete \ --delete \