merged-into
Delete all local branches that have been fully merged into the specified branch. Similar to the merged alias but allows you to specify any branch name as the target. For example, git merged-into main will delete all branches merged into main.
Usage:
git merged-into <branch-name>
CLI Command
git config --global alias.merged-into "!f() { git branch --merged "$1" | grep -v " $1$" | xargs -r git branch -d; }; f"
.gitconfig Snippet
[alias]
merged-into = !f() { git branch --merged "$1" | grep -v " $1$" | xargs -r git branch -d; }; f