Hi
You can use Visual Studio Code for this: https://azure.microsoft.com/en-us/products/visual-studio-code
Once you are logged into your Azure Subscription in VS code and MS Azure Policy extension is installed in VS Code, you can view all the policy definitions and assignments in VS code.
Save all the needed policy as json files in your local directory with save as option and then connect to Github through VS Code- Source Control.
You can use either VS UI or bash to push all the policy json files to any of your Github repository.
You can find more information on Github and VS code integration online.