This commit is contained in:
Marc Beninca 2024-11-17 13:35:36 +01:00
parent a6e05017b7
commit f4b9f4780c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -75,16 +75,17 @@ git_branch_set_upstream() {
gbsu() { git_branch_set_upstream "${@}"; } gbsu() { git_branch_set_upstream "${@}"; }
# redo the last commit with a different message # redo the last commit with a different message
gcam() { git_commit_amend_message() {
git \ git \
commit \ commit \
--amend \ --amend \
--message \ --message \
"${@}" "${@}"
} }
gcam() { git_commit_amend_message "${@}"; }
# make a root commit # make a root commit
gcem() { git_commit_empty_message() {
git \ git \
commit \ commit \
--allow-empty \ --allow-empty \
@ -92,61 +93,69 @@ gcem() {
--message \ --message \
"${@}" "${@}"
} }
gcem() { git_commit_empty_message "${@}"; }
# clean untracked files # clean untracked files
gcf() { git_clean_force() {
git \ git \
clean \ clean \
-d \ -d \
--force \ --force \
"${@}" "${@}"
} }
gcf() { git_clean_force "${@}"; }
# commit the index # commit the index
gcm() { git_commit_message() {
git \ git \
commit \ commit \
--message \ --message \
"${@}" "${@}"
} }
gcm() { git_commit_message "${@}"; }
# switch to a branch or checkout file(s) from a commit # switch to a branch or checkout file(s) from a commit
gco() { git_checkout() {
git \ git \
checkout \ checkout \
"${@}" "${@}"
} }
gc() { git_checkout "${@}"; }
# checkout an orphan branch # checkout an orphan branch
gcoo() { git_checkout_orphan() {
git \ git \
checkout \ checkout \
--orphan \ --orphan \
"${@}" "${@}"
} }
gco() { git_checkout_orphan "${@}"; }
# pick a commit # pick a commit
gcp() { git_cherry_pick() {
git \ git \
cherry-pick \ cherry-pick \
"${@}" "${@}"
} }
gcp() { git_cherry_pick "${@}"; }
# abort the commit pick # abort the commit pick
gcpa() { git_cherry_pick_abort() {
git \ git \
cherry-pick \ cherry-pick \
--abort \ --abort \
"${@}" "${@}"
} }
gcpa() { git_cherry_pick_abort "${@}"; }
# continue the commit pick # continue the commit pick
gcpc() { git_cherry_pick_continue() {
git \ git \
cherry-pick \ cherry-pick \
--continue \ --continue \
"${@}" "${@}"
} }
gcpc() { git_cherry_pick_continue "${@}"; }
# configure the user email # configure the user email
gcue() { gcue() {