"We all use linux commands in git even in windows. I wanted to know how does it let these linux commands run on windows?"
Asked
Active
Viewed 140 times
3

Sumit Dutta
- 43
- 3
1 Answers
2
Simply add <c:\path\to\git\bin>
to your %PATH%
and you can use the Unix command packaged with msysgit.
For instance, ls
or grep
would work.
C:\prgs>which ls
C:\prgs\git\PortableGit-1.9.5-preview20141217\bin\ls.EXE
Those commands are part of the MinGw/msys project which provides a minimalist development environment for native Microsoft Windows applications.
That is what is used to build git itself, and its collection of Linux commands (as Windows executable).
See more at:
-
I wanted to know how is it possible to use linux commands on windows? What is the mechanism? – Sumit Dutta Mar 27 '15 at 09:14
-
@SumitDutta Someone took the source code for various utilities/tool/commands that are common on linux and compiled them on windows, and included those windows executables in the msysgit package – nos Mar 27 '15 at 09:22
-
thanx @VonC, now I got what i was searching for. – Sumit Dutta Mar 27 '15 at 09:25