I have to write automated powershell script for cloning repository from gihtub but I need to install git using command line.Could you please let me know how can I download and install git on window using command line without doing any manual work.
Thanks in advance !
PowerShell GalleryIf you have at least PowerShell 5 or PowerShell 4 with PackageManagement installed, you can use the package manager to install posh-git for you. More information about PowerShell Gallery: https://docs.microsoft.com/en-us/powershell/scripting/gallery/overview.
To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .
You can script installation of Git using chocolatey.
The package is documented at https://chocolatey.org/packages/git
choco install -y git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With