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