threads / discuss / 39307

automatic git installation

Subject: automatic git installation

## tl;dr

4 messages between May 12, 2015 and May 13, 2015.

replies: 3people: 3as markdown or json

Knobbe, Fabian· May 12, 2015, 08:50 UTC · lore
Hallo,
I would like to automatically install git with a script. I already found some command line arguments to pass my settings to the setup routine, but I still don't know how to set "Adjust your PATH environment" to "Use Git from the Windows Command Prompt" without userinteraction.
Thanks for any hints!
Mit freundlichen Grüßen

Fabian Knobbe Landis+Gyr GmbH Operation Support BL Heat Humboldtstr. 64 - 90459 Nürnberg - Germany Office : +49 911 723 - 7134 Fax : +49 911 723 - 5254 fabian.knobbe@landisgyr.com www.landisgyr.com manage energy better

Geschäftsführer: Dr. Peter Heuell, Herbert Brunner Sitz der Gesellschaft: Nürnberg, Registergericht: Nürnberg, HR B 23 863

Haftungsausschluss: Diese Nachricht ist ausschließlich für die Person oder Einheit bestimmt, an die sie gerichtet ist. Sie enthält unter Umständen Informationen, die unter geltendem Recht vertraulich, gesetzlich geschützt oder von der Offenlegung ausgeschlossen sind. Falls Sie nicht der vorgesehene Empfänger oder verantwortlich für die Weiterleitung dieser Nachricht an den vorgesehenen Empfänger sind, ist es Ihnen strengstens untersagt, diese Nachricht offen zu legen, zu verteilen, zu kopieren oder in irgendeiner Art zu benutzen. Sollten Sie diese Nachricht versehentlich erhalten haben, benachrichtigen Sie bitte den Absender und löschen und vernichten Sie jegliche Kopie davon, die Sie möglicherweise erhalten haben.
Disclaimer: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.
P PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING THIS EMAIL.
This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you.
Johannes Schindelin· May 12, 2015, 15:10 UTC · re: Knobbe, Fabian · lore

Re: automatic git installation

Hi Fabian,
On 2015-05-12 10:50, Knobbe, Fabian wrote:
> I would like to automatically install git with a script.
... on Windows.
> I already found some command line arguments to pass my settings to the setup routine, but I still don't know how to set "Adjust your PATH environment" to "Use Git from the Windows Command Prompt" without user interaction.
If you use a recorded silent installation [*1*], you can choose that option in the recording stage and that should be enough to select it during replay.
For non-Windows users: Git for Windows uses an InnoSetup-based installer that has the option to adjust the user's PATH to either include the entire Git for Windows binaries including all third-party libraries, or just the so-called Git wrapper (it is a lone `git.exe` inside a directory that does *not* add all the `.dll` files that would possibly conflict with other executables on the PATH).

Ciao, Johannes

Footnote *1*: https://github.com/msysgit/msysgit/wiki/Silent-or-Unattended-Installation
Thomas Ferris Nicolaisen· May 12, 2015, 19:30 UTC · re: Knobbe, Fabian · lore

Re: automatic git installation

On Tue, May 12, 2015 at 10:50 AM, Knobbe, Fabian <Fabian.Knobbe@landisgyr.com> wrote:

Show 6 quoted lines
>
> Hallo,
>
> I would like to automatically install git with a script. I already found some command line arguments to pass my settings to the setup routine, but I still don't know how to set "Adjust your PATH environment" to "Use Git from the Windows Command Prompt" without userinteraction.
>
> Thanks for any hints!

Have you looked at Chocolatey? It's a Windows-based package manager that lets you install software like Git in one command [1].

[1] https://chocolatey.org/packages?q=git
Johannes Schindelin· May 13, 2015, 08:43 UTC · re: Thomas Ferris Nicolaisen · lore

Re: automatic git installation

Hi Thomas,
On 2015-05-12 21:30, Thomas Ferris Nicolaisen wrote:
Show 13 quoted lines
> On Tue, May 12, 2015 at 10:50 AM, Knobbe, Fabian
> <Fabian.Knobbe@landisgyr.com> wrote:
>>
>> Hallo,
>>
>> I would like to automatically install git with a script. I already found some command line arguments to pass my settings to the setup routine, but I still don't know how to set "Adjust your PATH environment" to "Use Git from the Windows Command Prompt" without userinteraction.
>>
>> Thanks for any hints!
> 
> Have you looked at Chocolatey? It's a Windows-based package manager
> that lets you install software like Git in one command [1].
> 
> [1] https://chocolatey.org/packages?q=git
Good point. Please note that Chocolatey essentially takes our portable Git and repackages it.
As for proper package management, the Git SDK is based on MSys2 which sports the Pacman package manager ported from Arch Linux. Git for Windows is also available via a "Pacman" repository, and our installer essentially takes the contents of up-to-date packages and bundles them in an installer.

Ciao, Dscho

← back to recent threads