A development tool I cannot live without: bin/merge_master_into_all_git_branches

1 comments

Could swear git will sometimes overwrite changes in a branch without always showing merge conflicts. It's super rare, but no one believes it unless it has happened to them.

Since this script touches all PRs, it could possibly touch stacked-diff branches if they exist, which ought to only be rebased from the parent. (Usually, parent-off-mainline rebases from mainline, and child rebases from parent.)

Just some thoughts. Can see it being handy in some cases, but the mysterious overwriting behavior makes me somewhat hesitant. Would prefer not to have an open PR committed to by a trawling script.

Thanks for your comment. I've been lucky enough not to be hit by these scenarios yet. One thing that might help is that we encourage short-lived PRs (ideally 1 day, max 1 week) so divergences from master tend to be smaller.

N is not huge though - looking at our operations logs, I think we ran this script only about 35 times in 3 years.