Phabricator deletes all branches in a mirror repository that are not in the Phabricator repository.
- Create a new repository "hosted on phabricator"
- add an external (e.g. github) repository as mirror
- Create a branch foo and push it to the external repository
- Wait until phabricator updates the repository (or force it)
Phabricator should only mirror branches that are added in phabricator. So it should keep the foo branch as is.
The foo branch in the external repository will get removed by phabracitor as it does not exist there.
I think there should be a configuration option to change this behavior.
A workaround is to configure phabricator to only the master branch. That keeps the external branches intact. That info was wrong. Branch is still removed on the mirror.
Based on the decisions in this ticket the documentation may should be extended (https://secure.phabricator.com/book/phabricator/article/diffusion_uris/#mirror-a-repository)