I am looking at automating the deployment of the code in Powershell environments.
I can easily execute the following command in a real session to get the code of a repository updated:
C:\path\to\PortableGit\git-bash.exe -c 'git -C /c/path/to/repository.git pull'
However we don't want to log into a session to update the code.
We have created a Service that will be in charge of updating the repository. The issue is that this command works from a real session, but it does not work from a service - it just hangs up.
I believe is because git-bash.exe requires to open a new Window with bash for a brief amount of time while the command is actually executed.
How can I execute this command from a Service ? Is there any other reasonable alternative ?