Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save riazul701/a0c35ef4987478a9d36e4d34a92e30e7 to your computer and use it in GitHub Desktop.
Save riazul701/a0c35ef4987478a9d36e4d34a92e30e7 to your computer and use it in GitHub Desktop.
Git: Pacman Installation on Git For Windows #git

Git For Windows (GitBash) Pacman Installation

The 'Git for Windows' by default does not come with MSYS2 package manager called 'Pacman' and hence it is a limited version or subset of the MSYS2. Also the bash which supplied wih 'Git for Windows' is not a full version of bash hence does not provide for full Linux environment.

However you can get package manager support inside 'Git for Windows' in following ways :

  1. Install full MSYS2 and build Git for Windows yourself (Most git users don't require all packages and MSYS2)
  2. Install Git for Windows SDK (heavy & consumes around 3-5 Gb space)
  3. Use a hack to merge the MSYS2 Pacman packages with your existing Git for Windows installation

Alternative to Full Install: If you are installing MSYS2 or the Git WindowsSDK then best to use installer. However if you dont want to go for full install then you can try an alternative of obtaining the zipped package here - http://repo.msys2.org/msys/x86_64/  

Given below is the easiest method (bullet 3 above) to enable package manager (Pacman) support for an existing Git for Windows installation.


Merge MSYS2 Pacman Packages with Git for Windows installation

  1. Install Git for Windows SDK (Require approx 4 GB) or check 'Alternative to Full Install' above.
  2. Copy ${git-sdk}/usr/bin/pacman.exe to ${git}/usr/bin
  3. Copy ${git-sdk}/etc/pacman.conf to ${git}/etc
  4. Copy ${git-sdk}/etc/pacman.d to ${git}/etc
  5. Copy ${git-sdk}/var to ${git}/

DONE!!! Now you can use Pacman to install new packages from the MSYS2 Repository.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment