#!/bin/env bash if [ "$1" == "" ] then echo "Il faut préciser un nom de branche !" exit 1 fi git_01_quick_commit.sh courante=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | sed 's:(::g' | sed 's:)::g'` if [ $courante != develop ] then echo "La branche actuelle n'est pas develop" read -p "Voulez-vous basculer sur develop ? " -n 1 -r echo # (optional) move to a new line if [[ $REPLY =~ ^[YyOo]$ ]] then git_00_checkout_branch.sh develop fi fi git branch $1 git checkout $1 git push --set-upstream all $1