Git update branch to master

Push feature branch to master

  1. Change to master branch and get latest if other developer push their feature branch to master

git checkout master

git pull

  1. Change to featurebranch and merge master to featurebranch if someone pushed their changes to master while you work on featurebranch, so that you may get conflicts to solve

git checkout hotfix

git merge --no-ff origin master

  1. Merge featurebranch to master

git checkout master

git merge --no-ff origin featurebranch


Yes, there has the way to update feature branch based on the latest master branch. You just need to execute the command on feature branch:

# On feature branch
git pull origin master --rebase

Now the feature branch contains the latest changes of master branch.