Make Develop your default branch. If you only have a master branch, Create new develop banch. (See create a new branch below) This is where you will work 85% of the time. Only use Master branch for production ready code.
If you add a new feature, go to develop branch and then create a new branch with feature name. (See create a new branch below)
- Once you're done with the new feature, Merge to develop.
- Push to staging server and test (optional).
- If all good on staging serve, switch to master beanch and merge develop branch into master.
- Then switch back to develop branch and delete the new feature branch. (Sometimes you will have merge confilct due to CSS etc.. I use https://www.sublimemerge.com/ free version to fix these issues)