better way to prevent delete of all files when deleting branch