The steps I follow to integrate my branches with master. It's just for illustrative purposes. More experienced git users may want to use a different sequence or naming conventions.
git checkout -b <name>/<date>/<ticket>/<description> # push tracking branch back to origin so people know you are working. git push origin <branch_name>:<branch_name> -u # develop, commit to local branch. git checkout master git pull # get changes # create a local safety branch of master .. if something goes wrong, just delete it and start again from this point. git checkout -b INTEGRATION_<branch_name> # merge your changes into the safety branch. git merge <branch_name> --no-ff git checkout master git merge INTEGRATION_<branch_name> mvn clean test git push