Introducing bash-merge
BashMerge combines Bash files using syntax-tree structure. It matches functions and variable assignments, retains surrounding comments and shebangs, and supports marked regions that should remain untouched. Parser support comes through TreeHaver’s registered backends, with merge infrastructure from AstMerge.
Read the upstream README for installation and usage, or browse the project repository.