Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4072864
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:56:19+00:00 2026-05-20T16:56:19+00:00

I have 2 local branches called develop and master; they are similar. On my

  • 0

I have 2 local branches called “develop” and “master”; they are similar. On my company’s server there’s one “main” repo (production) and several branches that were made by other developers:

$ git branch -a
* develop
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/some-test
  remotes/origin/feature1
  remotes/origin/feature2
  remotes/origin/master

How can I merge remotes/origin/feature1 and remotes/origin/feature2 into my local “master” branch, copy that all into “develop” and start working with actual code in my “develop” branch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:56:20+00:00Added an answer on May 20, 2026 at 4:56 pm
    1. git checkout master
    2. git pull origin feature1 feature2
    3. git checkout develop
    4. git pull . master (or maybe git rebase ./master)

    The first command changes your current branch to master.

    The second command pulls in changes from the remote feature1 and feature2 branches. This is an “octopus” merge because it merges more than 2 branches. You could also do two normal merges if you prefer.

    The third command switches you back to your develop branch.

    The fourth command pulls the changes from local master to develop.

    Hope that helps.

    EDIT: Note that git pull will automatically do a fetch so you don’t need to do it manually. It’s pretty much equivalent to git fetch followed by git merge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen two different ways of merging local branches. git checkout master git
There's a bunch of branches on one of my git repo's that I got
Hi I have 2 local branches - master and test . I added a
I often have at least 3 remote branches: master, staging and production. I have
So i have this local SVN repo that i am using for my dev
If you want to develop against WordPress (i.e., have a local instance running on
I have two git repositories on different PCs. I have some local branches on
I have three local and three remote branches and want to be on the
I have the following setup svn repository application | |-branches | | | |-develop-svn
I have 57 local branches. I know I made a change to a certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.