Coming soon - Get a detailed view of why an account is flagged as spam!
view details
2
Merging master into work branch for final merge
Post Flair (click to view more posts with a particular flair)
Post Body

A coworker uses a git merging strategy that I'm unfamiliar with and seems kind of unusual, and I'm trying to make sure that I understand how merges work. My understanding is that the normal flow is this:

  • checkout a new branch from master
  • work on that branch for a while
  • when you're done, checkout masterthe work branch, and run git merge <work-branch-name>

I also get that if your work branch has been running for a while, you may merge master into that branch periodically to keep it up to date with other changes.

What my coworker does is for the final merge is git checkout master; git merge <work-branch-name>. This results in a network like this one. Where the black branch would normally be master, in this image it's actually the work the coworker did on their work branch, while blue is the work done on master.

So the question is: does this flow have any downsides? The rest of the team does the more traditional "merge into master" or rebasing. My thought is that the coworker's work might get overwritten, if someone else on the team makes changes on the master branch in the same places that the coworker has edited in their branch. Anything else I might be missing?

(FYI, this is a copy of my question here).

ETA: fixed which branch one checks out prior to the merge

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
21,955
Link Karma
3,021
Comment Karma
18,879
Profile updated: 3 hours ago
Posts updated: 6 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago