Good day!
I'm not familiar with Powershell at all, and I want to make a script that excecutes every night at 2AM a git pull command in a given directory location. So basically the script must "cd" to that location and then execute "git pull".
I know Windows have the scheduler in which you can call the script, I just have no idea how to make that script.
Thanks in advance.
Warm regards.
Best Answer
cd
in Powershell an alias forSet-Location
which iscd
, and if the Git command line executable is in your path, you can call it from Powershell as well.or
The second solution is more idiomatic for Powershell. And remember, if the path to your repo contains spaces, you must put it between quotes.