0

Say, I am in a feature/branch and before i push i wanted to merge develop to feature/branch. Currently this is what i do.

Currently on feature branch.

  1. checkout develop
  2. pull develop to update from origin
  3. checkout again feature branch
  4. merge develop to feature branch

Basically, wanted to execute #1 and #2 without leaving the feature branch.

Thank you.

1 Answer 1

1

You may just do a git fetch to update the local tracking branch for develop, and then merge that into feature:

git checkout feature git fetch origin # update origin/develop get merge origin/develop 

This works by eliminating the git pull step, which would have done this:

git checkout develop git fetch origin git merge origin/develop 

You don't actually need to update your local develop branch, since the tracking branch already has the latest information.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.