git - update feature branch from master

Viewed 51

Let's say I have a feature branch derived from master. Master is ahead several commits. I want to include lastest updates from master into my feature branch.

What is the correct approach?

  1. git pull
  2. git pull --rebase
  3. git pull origin feature
  4. git pull origin master
  5. git rebase origin/master
  6. git merge origin/master
  7. Something else?

Sorry for lame question, but I really do have little bit of a mess in these commands. Description of the differences between the commands would be highly appreciated.

1 Answers

git rebase origin/master is the answer to your question.

Related