202511201600
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
git_current_branch() {
|
||||||
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||||
|
}
|
||||||
|
export CUR_BRANCH=`git_current_branch`o
|
||||||
|
|
||||||
|
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_feature_branch.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
GITCMD=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
case $GITCMD in
|
||||||
|
("checkout") git_00_checkout_branch.sh $@;;
|
||||||
|
("status") git_00_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_feature_branch.sh $@;;
|
||||||
|
(*) echo && echo "$GITCMD is not a GITCMD !" && usage;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user