Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge all branches into the base branch of a chain #57

Open
pcarranzav opened this issue Sep 6, 2024 · 1 comment
Open

Merge all branches into the base branch of a chain #57

pcarranzav opened this issue Sep 6, 2024 · 1 comment

Comments

@pcarranzav
Copy link

Sometimes we work on large chains of PRs that all get reviewed and approved in parallel.
At the end of the process, we merge all of them into the base branch and then push that, which effectively merges all of the chain PRs - we do this in order so that all of the merges are fast-forwards.
For this it would be useful to have a git chain merge-all (or maybe git chain collapse?).
Would others find this useful?

(Note this is different to #11 as that one is about merging the latest dependency branch into each chain branch, whereas here it's about merging all branches in the chain into the base branch)

@pcarranzav
Copy link
Author

pcarranzav commented Sep 6, 2024

Thinking about it more, just merging isn't sufficient... for each branch that is merged, you need to push it and then delete the branch on GitHub for GitHub to change the target in the subsequent PRs 🤔

(Update: if the repo on GitHub is configured to auto-delete branches, merging and pushing one branch at a time starting from the one closest to the base would do the trick)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant