Deploy Git for Windows via Intune | Win32 Packaging
Git for Windows is essential for developers and IT teams working with version-controlled scripts, infrastructure as code, and source repositories. It uses an Inno Setup EXE installer with a full set of silent switches to control shell integration, file associations, and default editor configuration.
Download the installer
Download the 64-bit installer from the official Git site:
https://git-scm.com/download/win
Click 64-bit Git for Windows Setup. The filename will be Git-2.x.x-64-bit.exe. Always download the latest stable release.
Wrap with the Content Prep Tool
IntuneWinAppUtil.exe -c "C:\AppSource\Git" -s "Git-2.44.0-64-bit.exe" -o "C:\IntunePackages"
Add the app in Intune
- Upload the .intunewin file
- Name: Git for Windows
- Publisher: The Git Development Community
Install and uninstall commands
Detection rule
Post-install Git configuration
# Set system-wide Git defaults (applies to all users on the device) # Deploy as a separate Intune PowerShell device script after Git installs $git = "C:\Program Files\Git\cmd\git.exe" # Handle line endings (recommended for Windows) & $git config --system core.autocrlf true # Use Windows Credential Manager & $git config --system credential.helper wincred # Set default branch name & $git config --system init.defaultBranch main
Frequently Asked Questions
Use: Git-
No. Git for Windows uses an Inno Setup EXE installer. Use the /VERYSILENT switch for silent deployment. The /COMPONENTS switch controls which optional components are installed such as shell integration and file associations.
Use a file detection rule: check for git.exe in C:\Program Files\Git\cmd. This is consistent across all Git versions.
Deploy a PowerShell script via Intune after the Git install that runs git config --system to set global defaults like core.autocrlf and credential.helper. System-level config applies to all users on the device.