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
I make a branch "develop-B" which is branched off "develop-A"
"develop-A" is squash-merged into main branch
"develop-B" is squash-merged into main branch
Now the approach this script uses (git cherry) fails because there is not a single commit that matches the squashed commit representing "develop-B", it's spread across two commits.
@ggilder The approach you're taking in the script you link to won't work in general because it gets broken by subsequent work in the repo.
make a branch work that modifies file A
squash merge it to master, but don't delete it
later merge a different branch to master that deletes file A
Merging work to master at this point will produce a change. Your script would not consider work eligible for deletion, but the one in this repo should.
For example:
Now the approach this script uses (
git cherry
) fails because there is not a single commit that matches the squashed commit representing "develop-B", it's spread across two commits.I think that it's possible to fix this and simplify the script by using
git merge-tree
andgit merge-base
. Here's an example: https://github.com/ggilder/dotfiles/blob/master/bin/git-delete-merged-branches#L9The text was updated successfully, but these errors were encountered: