# Commit
#
declare comment
- declare default="${file##$(git_root)/}"
if [ -n "$(git status --porcelain "$file")" ]
then
+ echo -e ">> COMMIT\n"
+ declare default="${file##$(git_root)/}"
read -e -p "Your comment: " -i "$default" comment
if [ -z "$comment" ]
then
- echo "Commit canceled because of empty comment!"
+ echo "> Commit canceled because of empty comment!"
return 1
fi
git commit -m "$comment" "$file"
#
# Push
#
+ echo -e ">> PUSH\n"
git push
#
if [ $(git branch | wc -l) -gt 1 ]
then
case "$(git_branch)" in
- master) git branch | grep ' testing$' && git_merge_to testing;;
- testing) git_merge_to master;;
+ master)
+ echo -e ">> MERGE TO testing\n"
+ git branch | grep ' testing$' && git_merge_to testing
+ ;;
+ testing)
+ echo -e ">> MERGE TO master\n"
+ git_merge_to master
+ ;;
esac
else
- echo "Only one branch no merging"
+ echo "> Only one branch no merging"
fi
}