Created
March 18, 2016 15:58
-
-
Save ahmetkizilay/cf42f7c88c183a3ffdfc to your computer and use it in GitHub Desktop.
git flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
TEMP_BRANCH=temp | |
CURRENT_BRANCH=$(git name-rev --name-only HEAD) | |
COMMANDS[0]="git branch -D $TEMP_BRANCH" | |
COMMANDS[1]="git checkout -b $TEMP_BRANCH" | |
COMMANDS[2]="git add ." | |
COMMANDS[3]="git commit" | |
COMMANDS[4]="git checkout $CURRENT_BRANCH" | |
COMMANDS[5]="git pull origin $CURRENT_BRANCH" | |
COMMANDS[6]="git checkout $TEMP_BRANCH" | |
COMMANDS[7]="git rebase $CURRENT_BRANCH" | |
COMMANDS[8]="git checkout $CURRENT_BRANCH" | |
COMMANDS[9]="git merge $TEMP_BRANCH" | |
COMMANDS[10]="git push origin $CURRENT_BRANCH" | |
for c in "${COMMANDS[@]}" | |
do | |
read -p "$c" | |
$c | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment