You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you have multiple PRs in flight at once where one PR depends on another. You can manage this by setting the base branch of a PR to the branch of the first PR, but you need to remember to set that back to master after the first PR is merged. Sometimes you even have a third PR stacked.
I call these "stacked branches" because the underlying model in git is one branch on another on another. PRs are just associated with those branches.
If the first PR is changed in a destructive way (editing commits via --amend, or git rebase or other similar commands), the stack of branches on it also needs to be rebased.
When you create a second PR on a branch that already has an open PR, the second one needs to have a base branch set to the branch of the first.
When you merge a PR to master, you need to rebase the other branches and set the base branch of the lowest remaining PR in the stack to master.
These things can all be scripted to automate them. Perhaps give this some thought to come up with a cohesive model and set of standard operations, and build it all into git-stack.
This may need hub pr (hub pull-request) to be aware of stacks so when you create a PR it sets the base branch properly.
The text was updated successfully, but these errors were encountered:
Sometimes you have multiple PRs in flight at once where one PR depends on another. You can manage this by setting the base branch of a PR to the branch of the first PR, but you need to remember to set that back to
master
after the first PR is merged. Sometimes you even have a third PR stacked.I call these "stacked branches" because the underlying model in git is one branch on another on another. PRs are just associated with those branches.
If the first PR is changed in a destructive way (editing commits via
--amend
, orgit rebase
or other similar commands), the stack of branches on it also needs to be rebased.When you create a second PR on a branch that already has an open PR, the second one needs to have a base branch set to the branch of the first.
When you merge a PR to master, you need to rebase the other branches and set the base branch of the lowest remaining PR in the stack to master.
These things can all be scripted to automate them. Perhaps give this some thought to come up with a cohesive model and set of standard operations, and build it all into
git-stack
.This may need
hub pr
(hub pull-request
) to be aware of stacks so when you create a PR it sets the base branch properly.The text was updated successfully, but these errors were encountered: