How to update my working Git branch from another branch (develop) ?

Eki Eqbal picture Eki Eqbal · Oct 1, 2014 · Viewed 84.3k times · Source

I made a new branch for my code like a month ago, I created feature1 branch from develop branch.

⇒  git branch 
  develop
* feature1

I've been working on feature1 for a month now and a lot of the changes pushed to develop branch, How can I update my current branch feature1 with the latest commits at develop one?

I don't want to checkout master and merge my feature1 branch. Neither I want to use git cherry-pick to manually move commits from develop to feature1.

Any help ?

Answer

musiKk picture musiKk · Oct 1, 2014

You just merge develop to feature1:

git checkout feature1
git merge develop

There is no need to involve another branch such as master.