powershell - How to invoke bunch of git commands from the remote location without going to that location -
i want invoke git commands in tfs post build script push artifact aws code commit. need invoke git commands form artifact location. how it, can't cd. check below commands , created 1 powershell script contains these commands , when invoking script manually going inside folder. it's running fine. if invoke tfs build. looks invoking command somewhere else. please help...
git init
git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/mv
git remote add origin https://git-codecommit.us-east-1.amazonaws.com/v1/repos/mv
git checkout -b mvtest
git add mv.txt
git commit -m "first commit"
git push origin mvtest
i use invoke-command, below should work assuming git installed , integrated powershell.
invoke-command -computername remotecomputer -scriptblock ` {set-location c:\;git init;git;git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/mv}
use ';' separate each command.
Comments
Post a Comment