09/02/2015 - GIT
Work done as in "hotfix" is merged into develop and master branch so we should be careful with what we're doing. To make this process easy, we will use git flow
command. For more information, click git flow link.
inanzzz@inanzzz:~/project$ sudo apt-get install git-flow
inanzzz@inanzzz:~/project$ git checkout develop
inanzzz@inanzzz:~/project$ git remote update
inanzzz@inanzzz:~/project$ git pull origin develop
inanzzz@inanzzz:~/project$ git pull origin master
inanzzz@inanzzz:~/project$ git checkout master
Accept default options in questions.
inanzzz@inanzzz:~/project$ git flow init
Make sure the hotfix tag 1.30.3
doesn't exist or used yet in remote repository. Command below will check you out into hotfix branch.
inanzzz@inanzzz:~/project$ git flow hotfix start 1.30.3
inanzzz@inanzzz:~/project$ git add --all
inanzzz@inanzzz:~/project$ git commit -m 'message goes here'
inanzzz@inanzzz:~/project$ git push origin hotfix/1.30.3
Go to your GitHub account and select "master" branch to compare your hotfix PR (pull request) instead of "develop" so it will read like “Inanzzz wants to merge 1 commit into master from hotfix/1.30.3” on top of your PR.
inanzzz@inanzzz:~/project$ git flow hotfix finish 1.30.3
Summary of actions:
- Hotfix branch 'hotfix/1.30.3' has been merged into 'master'
- The hotfix was tagged '1.30.3'
- Hotfix tag '1.30.3' has been back-merged into 'develop'
- Hotfix branch 'hotfix/1.30.3' has been locally deleted; it has been remotely deleted from 'origin'
- You are now on branch 'develop'
inanzzz@inanzzz:~/project$ git push
inanzzz@inanzzz:~/project$ git push --tag
If you go to Github account, you’ll see that the hotfix branch has been closed and deleted automatically. Also if you select "develop" and "master" branches from dropdown, you should see a note "Merge branch 'hotfix/1.30.3'".