Purpose
The purpose of this document is to provide the steps necessary to migrate a PowerShell Universal git repository from one remote to another.
Overview
PowerShell Universal does not provide this functionality directly in the platform. You will need a git client installed on your machine to follow this process.
Process
1. Create a bare git repository on the target remote.
2. If you have configured git sync in the PowerShell Universal admin console, navigate to Settings \ Git, click Git Settings and then click Reset.
3. Stop the PowerShell Universal service.
4. Navigate to the PowerShell Universal repository and run the following commands:
- git remote set-url <remote name> <target git repository>
- git push
An example of this command would be:
After running the command, your PowerShell Universal configuration files will be present in the new repository.
5. If you have configured git settings within appsettings.json, update your git settings to reflect the new git remote.
6. Start the PowerShell Universal service.
7. If you have configured git settings within the admin console, navigate to Settings \ Git and click Git Setting. Enter the new git remote settings.