Files
2025-11-21 14:55:57 +01:00

41 lines
1.2 KiB
Bash
Executable File

#!/bin/env bash
git_parse_branches() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
git_current_branch() {
export GIT_CURRENT_BRANCH="$(git_parse_branches)"
}
git_current_branch
usage(){
echo
echo Liste des commandes
echo ---- checkout pour git_00_checkout_branch.sh
echo ---- status pour git_00_status.sh
echo ---- commit pour git_01_quick_commit.sh
echo ---- add pour git_02_add_branch.sh
echo ---- push pour git_03_push_branch.sh
echo ---- merge pour git_04_merge_branch.sh
echo ---- delete pour git_05_delete_feature_branch.sh
echo ---- delete_all pour git_06_delete_all_features_branch.sh
}
GITCMD=$1
shift
case $GITCMD in
("checkout") git_98_checkout_branch.sh $@;;
("status") git_99_status.sh $@;;
("commit") git_01_quick_commit.sh $@;;
("add") git_02_add_branch.sh $@;;
("push") git_03_push_branch.sh $@;;
("merge") git_04_merge_branch.sh $@;;
("delete") git_05_delete_feature_branch.sh $@;;
("delete_all") git_06_delete_all_features_branch.sh $@;;
("rename") git_07_rename_branch.sh $@;;
(*) echo && echo "$GITCMD is not a GITCMD !" && usage;;
esac