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

  • Home
  • SEARCH
  • 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 9243957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:55:14+00:00 2026-06-18T08:55:14+00:00

I have two developers working simultaneously, one on master (dev1) and one on another

  • 0

I have two developers working simultaneously, one on master (dev1) and one on another branch (dev2). The master is being treated as the “mainline”. Dev1 regularly merges the changes from the branch of dev2 as follows:

git checkout master
git merge origin/branch1
git push origin master 

This merges the branch with the master for a deployment, but dev2 also wants to get the latest changes from the master after the merge is complete. I am thinking this is the best approach:

git checkout branch1
git rebase master

Is this correct?

In Github, I noticed that the branch they were working on no longer appears and no one deleted it. I’m pretty sure rebase or merge will not delete the branch unless you tell it to. Let me know otherwise.

Basically, the graph would look something like:

     b1  b2   b3 b4...
    /      \ /     \
   m1   m2  m3  m4  m5...

m3 and m5 are where dev1 will merge b2 and b4, respectively.

  • 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-06-18T08:55:15+00:00Added an answer on June 18, 2026 at 8:55 am

    The rebase is only valid if dev2 is rebasing unpublished commits.

    But dev2 rebased commits already pushed to origin (and potentially already merged by dev1 into master), then it is not the right approach, because the SHA1 are changed, and the next merge of branch1 by dev1 won’t just merge new commits, but all commits, even those already merged.

    In this specific situation, dev2 needs to merge master with git merge master – that will avoid those problems.

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

Sidebar

Related Questions

Two developers are working on the develop branch on two entirely different changes (say,
Assuming you have two developers working on a project locally on their laptops (A
I have now been working as a web developer for two weeks and have
I have a repositories, i want to have two views: Developers can see the
The company I used to work with has two developers working fulltime, and a
My team of 10 developers is working with another team of 10 developers, designers
Assume I am one of many developers working with git on a huge code
(Make this CW if needed) We are two developers working on a web application
I have two branches in my local git repository, master and Logging. Both branches
I am having trouble understanding why this is not working. I have two fields

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.