How to Install Git in Cygwin

Abdul Jabbar Feb 02, 2024
  1. What is Cygwin
  2. Install Git on Windows Under Cygwin
  3. Compile Git From Source
How to Install Git in Cygwin

Git is considered an active, innovative, and highly recommended distributed version control system with a magical independent command line that grants us high-level functionalities and a complete approach to internals at the same time.

What is Cygwin

Cygwin is considered among the easiest and most beneficial Linux/Unix mirroring tools for Windows. It can support a huge set of GNU and Open Source tools supplying performances like Linux/Unix distribution on Windows.

As we know that it is not manufactured for working native Linux apps on Windows straightly, it unusually develops native Windows apps familiar with Linux/UNIX® performances like signals, ptys, etc. Auspiciously, Cygwin formerly has the most superior and most demanding ones in the package that allows customization of installation time.

Install Git on Windows Under Cygwin

Installing Cygwin-based Git can be somewhat difficult on Windows compared to Linux or Mac, but if we pursue the steps in this guide, we will not face problems using Git on Windows.

First, we must install Cygwin on our system and add its bin directory to the system path. After installing Cygwin, we will run setup.exe internally in the Cygwin installation folder, and after that, we have to ensure that the following modules are already installed.

  1. make
  2. gcc c and c++ compilers
  3. openssl-devel
  4. curl-devel
  5. Any other dependencies that are missing.

The packages are present internally in the Dev branch of the package tree.

The required dependencies will be selected naturally. After that, click Next to install selected packages.

Compile Git From Source

After we have downloaded the Git source using the command tar xvzf git-1.5.5.tar.gz.

Now we will go to the untarred directory for operating it using a command prompt. After that, run the make command inside the Git source directory.

After running this command successfully, we will run make install. Before executing the commands, it should be verified that it previously had Perl language installed.

We can do the verification by just executing the following command.

Perl -MCPAN -e 'shell'

After that, we will run the following command inside the CPAN shell.

install blib

So for summarizing, we will mention again, as seen above, to run both the commands to make and install Perl.

1: make
2: make install
Author: Abdul Jabbar
Abdul Jabbar avatar Abdul Jabbar avatar

Abdul is a software engineer with an architect background and a passion for full-stack web development with eight years of professional experience in analysis, design, development, implementation, performance tuning, and implementation of business applications.

LinkedIn