Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a Git command using a PowerShell script [duplicate]

Tags:

git

powershell

How do I execute a Git command through a PowerShell script?

like image 297
vmb Avatar asked Feb 16 '15 11:02

vmb


People also ask

How do you repeat a PowerShell script?

Turns out the answer is fairly straight forward, wrap the command in a loop forever. This'll allow you to Ctrl-C out of it, and it'll keep repeating even after your command completes or otherwise exits the first time.

How do I get PowerShell to recognize Git?

Check that git is accessible from PowerShell by executing git --version from PowerShell. If git is not recognized as the name of a command, verify that you have Git installed. If not, install Git from https://git-scm.com. If you have Git installed, make sure the path to git is in your PATH environment variable.


1 Answers

Install Git for Windows, and make sure to put Git/bin folder in your Windows path variable.

Here is a good link to make your experience of Git and PowerShell better:

Make PowerShell, SSH GitHub and Git suck less on Windows

like image 180
wallybh Avatar answered Sep 28 '22 03:09

wallybh