You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
547 B

#!/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_98_checkout_branch.sh develop
	fi
fi
git branch $1
git checkout $1
git push --set-upstream all $1