Skip to content

Commit 3caea0a

Browse files
Okeanosdscho
authored andcommitted
Make silent or unattended installation guide more comprehensive based on git-for-windows/git#4630
1 parent af14829 commit 3caea0a

1 file changed

Lines changed: 59 additions & 8 deletions

File tree

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,82 @@
1+
## Using Command-Line Options
2+
13
It is possible to install Git for Windows silently using the following flags when called from a command-line prompt:
4+
25
```
36
Git-<version>-<bitness>.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh"
47
```
58

6-
An example of this is
9+
## Using Installer Options From a File
10+
11+
You can also load install parameters from a file with `/LOADINF="filename"`, and you can record parameters to a file using `/SAVEINF="filename"`.
12+
13+
Example for saving selected options to a file:
14+
715
```
8-
Git-2.12.2.2-64-bit.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh"
16+
Git-<version>-<bitness>.exe /SAVEINF=git_options.ini
917
```
1018

11-
You can find all of the possible flags to use by calling the installer with the `/?` flag (for the options supported by InnoSetup out of the box), and by inspecting the [`install.iss` file](https://github.com/git-for-windows/build-extra/blob/HEAD/installer/install.iss) (for custom options added only to Git for Windows' installer).
19+
Example reusing that previously created file to silently install Git in unattended mode:
1220

13-
You can also load install parameters from a file with `/LOADINF="filename"`, and you can record parameters to a file using `/SAVEINF="filename"`.
21+
```
22+
Git-<version>-<bitness>.exe /VERYSILENT /NORESTART /NOCANCEL /LOADINF=git_options.ini
23+
```
1424

1525
An example of a parameter file is:
1626

17-
```
27+
```ini
1828
[Setup]
1929
Lang=default
2030
Dir=C:\Program Files\Git
2131
Group=Git
2232
NoIcons=0
2333
SetupType=default
24-
Components=
34+
Components=gitlfs,assoc,assoc_sh,windowsterminal
2535
Tasks=
36+
EditorOption=VIM
37+
CustomEditorPath=
38+
DefaultBranchOption=main
2639
PathOption=Cmd
2740
SSHOption=OpenSSH
28-
CRLFOption=CRLFAlways
41+
TortoiseOption=false
42+
CURLOption=WinSSL
43+
CRLFOption=CRLFCommitAsIs
44+
BashTerminalOption=MinTTY
45+
GitPullBehaviorOption=Merge
46+
UseCredentialManager=Enabled
47+
PerformanceTweaksFSCache=Enabled
48+
EnableSymlinks=Disabled
49+
EnablePseudoConsoleSupport=Disabled
50+
EnableFSMonitor=Disabled
2951
```
3052

31-
More information on commandline parameters can be found in [InnoSetup's documentation](http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline).
53+
## Installer Options
54+
55+
You can find all of the possible flags to use by calling the installer with the `/?` flag (for the options supported by [InnoSetup](http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline) out of the box), and by inspecting the [`install.iss` file](https://github.com/git-for-windows/build-extra/blob/HEAD/installer/install.iss) (for custom options added only to Git for Windows' installer).
56+
57+
### Custom Installer Options
58+
59+
A list of installer custom options as of Git for Windows v2.42.0.windows.2 is below:
60+
61+
| Key | Values | Default | Remark |
62+
| ---------------------------------- | -------| ------- | ------ |
63+
| EditorOption | Nano, VIM, Notepad++, VisualStudioCode, VisualStudioCodeInsiders, SublimeText, Atom, VSCodium, Notepad, Wordpad, CustomEditor | VIM | |
64+
| CustomEditorPath | | | Path and options for custom text editor (only in combination with EditorOption=CustomEditor) |
65+
| DefaultBranchOption | | | Default branch name |
66+
| PathOption | BashOnly, Cmd, CmdTools | Cmd | |
67+
| SSHOption | OpenSSH, ExternalOpenSSH, Plink | OpenSSH | |
68+
| TortoiseOption | true, false | false | Only in combination with SSHOption=Plink |
69+
| CurlOption | OpenSSL, WinSSL | OpenSSL | |
70+
| CRLFOption | LFOnly, CRLFAlways, CRLFCommitAsIs | CRLFAlways | |
71+
| BashTerminalOption | MinTTY, ConHost | MinTTY | |
72+
| GitPullBehaviorOption | Merge, Rebase, FFOnly | Merge | |
73+
| UseCredentialManager | Enabled, Disabled, Core | Enabled | Core does exactly the same as Enabled and exists for historical reasons |
74+
| PerformanceTweaksFSCache | Enabled, Disabled | Enabled | |
75+
| EnableSymlinks | Auto, Enabled, Disabled | Auto | |
76+
| AddmandatoryASLRsecurityexceptions | Auto, Enabled, Disabled | Auto | |
77+
| EnableBuiltinDifftool | Auto, Enabled, Disabled | Auto | |
78+
| EnableBuiltinRebase | Auto, Enabled, Disabled | Auto | |
79+
| EnableBuiltinStash | Auto, Enabled, Disabled | Auto | |
80+
| EnableBuiltinInteractiveAdd | Auto, Enabled, Disabled | Auto | |
81+
| EnablePseudoConsoleSupport | Auto, Enabled, Disabled | Auto | |
82+
| EnableFSMonitor | Auto, Enabled, Disabled | Auto | |

0 commit comments

Comments
 (0)