-
Notifications
You must be signed in to change notification settings - Fork 13
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
Not entirely clear what to do when an intermediate chain link PR merges in #12
Comments
I have the same issue – although without squashing. I currently have a command that deletes local branches when they get merged remotely, and I'm love a way to remove the branch from the chain easily. Equally there's no obvious way to manually delete a whole chain if you mess it up somehow? |
once the intermediate PR closes and you delete the local branch, does the chain still work? |
Bumping this issue because I'm running into the same issue. |
I think Prune fixes this, right? |
If it can help, here's my own process:
# The two commands below are aliased as `pp` for me
git pull
# This will prune the deleted branch for the origin remote and also delete their local counterparts
git remote prune origin | rg --pcre2 -o '(?<=\[pruned\] origin/).+' | xargs git branch -D
# Finally, the same chain setup command but with `a` skipped
git chain setup -c chain-name main b c For pruning deleted branches I use ripgrep but you can also look into git-removed-branches, I just haven't tested it yet. Hope this helps 😊 |
This doesn't seem to work for me. The chain still contains the commits from branch |
@nathggns, There is now a Mine sometimes gets messed up with remote squashes etc (as described by OP). Then I:
But in the happy case where things work without squashing and you don't need to teardown/setup the whole chain from scratch, this is my work flow:
|
That's fantastic. Thank you! |
Say i have a chain
master -> a -> b -> c
anda
is now merged into master (with squashing). Do we need to create a new chain? how to removea
from the chain? is there a way to remove the squashed commits froma
automatically?The text was updated successfully, but these errors were encountered: