No part of the aliases should rely on a fixed branch name. The easiest solution would simply be to remove all aliases that rely on a hardcoded branch name, such as swm for switch main. However, a better solution would be to allow users some way of designating a branch as "the primary branch" for each repository. So swm could be reconfigured to mean switch master or switch dev or switch prod depending on the repo without having to change the alias.