Script to move a role in a feature branch

This commit is contained in:
Jérémy Lecour 2017-07-14 11:41:49 +02:00
parent 64ea3222b7
commit 1468f85229
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
readonly role=$1
readonly current_branch=`git branch | grep '\*' | awk '{print $2}'`
echo "role: $role"
echo "current_branch: $current_branch"
# echo "Ctrl-C to cancel"
# sleep 3
git rm -r --cached --quiet $role
git commit -m "More $role to a feature branch"
git checkout -b $role
git add $role
git commit -m "[WIP] $role role"
git push --set-upstream origin $role
git checkout $current_branch