@Song Thanks for reaching out. You can point to any git repository and you need to navigate to the "Custom Domains" blade and change the custom domain assigned to the SCM endpoint. For more details, you can refer to this document. In case if your azure repo and custom repo may have the URL segment so you cannot point and it will not be supported.
Note: You cannot modify Url segments used for Git repository as it is not supported in the service. You can submit the feature request here if this is something that you would want to see in APIM.
You might be already aware of this but sharing the same for the community that this feature is designed to work with API Management services that have a small/medium configuration.