From 33a638dbef0d1e1a7d135c0b63bc552d67c9739a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 17 Nov 2024 14:20:55 +0100 Subject: [PATCH] git --- shell/alias/git.sh | 63 ++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/shell/alias/git.sh b/shell/alias/git.sh index 5bedf14..05609a9 100644 --- a/shell/alias/git.sh +++ b/shell/alias/git.sh @@ -351,163 +351,184 @@ git_merge_commit() { gmc() { git_merge_commit "${@}"; } # squash a branch and index its modifications -gms() { +git_merge_squash() { git \ merge \ --squash \ "${@}" } +gms() { git_merge_squash "${@}"; } # merge via external tool -gmt() { +git_merge_tool() { git \ mergetool \ "${@}" } +gmt() { git_merge_tool "${@}"; } # push to the remote repository -gp() { +git_push() { git \ push \ --tags \ --verbose \ "${@}" } +gp() { git_push "${@}"; } # delete from the remote repository -gpd() { +git_push_delete() { git \ push \ --delete \ "${@}" } +gpd() { git_push_delete "${@}"; } # force the push to the remote repository -gpf() { +git_push_force() { gp \ --force \ "${@}" } +gpf() { git_push_force "${@}"; } # rebase current branch onto another -grb() { +git_re_base() { git \ rebase \ "${@}" } +grb() { git_re_base "${@}"; } # abort current rebase -grba() { +git_re_base_abort() { git \ rebase \ --abort \ "${@}" } +grba() { git_re_base_abort "${@}"; } # continue current rebase -grbc() { +git_re_base_continue() { git \ rebase \ --continue \ "${@}" } +grbc() { git_re_base_continue "${@}"; } # force rebase without fast-forward -grbf() { +git_re_base_force() { git \ rebase \ --force-rebase \ "${@}" } +grbf() { git_re_base_force "${@}"; } # rebase interactively -grbi() { +git_re_base_interactive() { git \ rebase \ --interactive \ "${@}" } +grbi() { git_re_base_interactive "${@}"; } # remove and add removal to index -grm() { +git_re_move() { git \ rm \ "${@}" } +grm() { git_re_move "${@}"; } # add a new remote repository -grma() { +git_re_mote_add() { git \ remote \ add \ "${@}" } +grma() { git_re_mote_add "${@}"; } # list remote repositories -grml() { +git_re_mote_list() { git \ remote \ --verbose \ "${@}" } +grml() { git_re_mote_list "${@}"; } # show connection to a remote repository -grms() { +git_re_mote_show() { git \ remote \ show \ "${@}" } +grms() { git_re_mote_show "${@}"; } # set the location of a remote repository -grmsu() { +git_re_mote_set_upstream() { git \ remote \ set-url \ "${@}" } +grmsu() { git_re_mote_set_upstream "${@}"; } # remove file(s) from index or move current branch pointer -grs() { +git_re_set() { git \ reset \ "${@}" } +grs() { git_re_set "${@}"; } # wipe modifications or reset current branch to another commit -grsh() { +git_re_set_hard() { git \ reset \ --hard \ "${@}" } +grsh() { git_re_set_hard "${@}"; } # current state of repository -gs() { +git_status() { git \ status \ --untracked-files="all" \ "${@}" } +gs() { git_status "${@}"; } # show a commit -gsc() { +git_show_commit() { git \ show \ "${@}" } +gsc() { git_show_commit "${@}"; } # tag a commit -gt() { +git_tag() { git \ tag \ "${@}" } +gt() { git_tag "${@}"; } # delete a tag -gtd() { +git_tag_delete() { git \ tag \ --delete \ "${@}" } +gtd() { git_tag_delete "${@}"; }