Skip to content

Instantly share code, notes, and snippets.

@tehmul
Last active August 28, 2017 05:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tehmul/56ffb6bff0cd2679d403d06e9d37c8fb to your computer and use it in GitHub Desktop.
Save tehmul/56ffb6bff0cd2679d403d06e9d37c8fb to your computer and use it in GitHub Desktop.
msys2 #git #msys2
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS2 here\command]
@="C:\\msys64\\msys2.exe bash"
[HKEY_CLASSES_ROOT\Folder\shell\MSYS2 here\command]
@="C:\\msys64\\msys2.exe bash"
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS2 here]
[-HKEY_CLASSES_ROOT\Folder\shell\MSYS2 here]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2]
[-HKEY_CLASSES_ROOT\Folder\shell\open_msys2]

Setting up MSYS2 with Git

  • Download and install msys2 from http://www.msys2.org/
  • After the installation is complete, open the MSys2 prompt
  • Set the http_proxy and https_proxy variables if required using:
export http_proxy=http://your-proxy:port/
export https_proxy=$http_proxy
  • Run
pacman -Syuu

and follow the instructions. Repeat this step until it says there are no packages to update.

  • Within the msys2 prompt, run
pacman -S \
    autoconf autogen automake \
    bc bison \
    clang cmake ctags  \
    dash diffutils dos2unix doxygen \
    ed \
    gcc git git-flow global gnu-netcat \
    lzip liblzma-devel libffi-devel libxslt-devel \
    make man-db man-pages-posix mc mksh \
    ncurses-devel \
    openssl-devel \
    p7zip pcre-devel procps psmisc pwgen \
    rsync \
    tar texinfo tig tmux tree \
    unrar unzip \
    vim \
    w3m \
    zip zlib-devel zsh

NOTE: Symlink creation requires running msys2 as administrator. The variable MSYS should be set to winsymlinks

export MSYS=winsymlinks
  • If you need an easy way to open Msys2 within your current directory in Windows explorer, download and run: msys2-here-install-reg so that you can right-click and choose "MSYS2 here" on a folder.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2]
@="Open MSYS2 here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
[HKEY_CLASSES_ROOT\Folder\shell\open_msys2]
@="Open MSYS2 here"
[HKEY_CLASSES_ROOT\Folder\shell\open_msys2\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment