2017-07-14 11:41:49 +02:00
|
|
|
#!/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
|
2017-07-14 18:44:09 +02:00
|
|
|
git commit -m "Move $role to a feature branch"
|
2017-07-14 11:41:49 +02:00
|
|
|
git checkout -b $role
|
|
|
|
git add $role
|
|
|
|
git commit -m "[WIP] $role role"
|
|
|
|
git push --set-upstream origin $role
|
|
|
|
git checkout $current_branch
|