I have Repository on AzureDevops, and i'm mirroring it to CodeCommit.
The PowerShell Script that I'm using right now is:
$env:GIT_REDIRECT_STDERR = '2>&1'
git clone --mirror https://$env:SYSTEM_ACCESSTOKEN@dev.azure.com/MelonElevenPoint2/ThrottleUp/_git/ThrottleUp_Mobile
cd ThrottleUp_Mobile.git
git push --force --all https://$(user):$(pass)@git-codecommit.us-east-2.amazonaws.com/v1/repos/ThrottleUp
As of now, when I push on the develop branch, I build full repo on Code Commit. This needs to be changed, example: On push to develop branch, I need to build only develop branch on Code Commit
I have created similar script but id does not work:
$env:GIT_REDIRECT_STDERR = '2>&1'
git clone --mirror https://$env:SYSTEM_ACCESSTOKEN@dev.azure.com/MelonElevenPoint2/ThrottleUp/_git/ThrottleUp_Mobile
cd ThrottleUp_Mobile.git
git push origin develop https://$(user):$(pass)@git-codecommit.us-east-2.amazonaws.com/v1/repos/ThrottleUp
I'm getting this kind of error: fatal: --mirror can't be combined with refspecs
Any help?