add setOnlyBranches() to limit operations to these branches