Revert "Fix delete branches (#119399)"
This reverts commit e1fc7e1ebcf4b87d5c34bf276806212c38ca00f0.
Reverted https://github.com/pytorch/pytorch/pull/119399 on behalf of https://github.com/clee2000 due to has a bug ([comment](https://github.com/pytorch/pytorch/pull/119399#issuecomment-1936291560))