Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on windows machine and I use bash shell which comes with git. But there are many utilities which are missing in this version of bash shell.

How can I install more commands on this shell.

Thanks In Advance.

share|improve this question

There are two versions of Git that you are likely to be using - the msysgit distribution or Cygwin.

Installing Additional Utilities For Cygwin

Although you might have only installed Git as a part of your Cygwin install (if you used Cygwin), Cygwin has a program called setup.exe which you can use to add packages. Essentially, all you have to do is run setup.exe and pick out what programs you want installed when you get to the Select Packages window. The introduction here provides a good overview with images that detail the process.

Cygwin's installer is smart enough to figure out that you have a preexisting installation, and it will add packages to your installation (instead of nuking it and starting over).

MSYS

The other version of Git you are probably using (if not Cygwin) is msysgit. Because msysgit installs a minimal Unix environment which is not really compatible with MinGW, you'll end up having to install the MinGW suite beside msysgit. The MinGW Getting Started page gives a detailed overview on how to go about getting MinGW installed - since I have no experience with MinGW personally, all I can really do is refer you to their instructions.

You'll then have to migrate your msysgit installation into MinGW. This can be accomplished by doing the following (taken from here). After the following sequence is done, MinGW should find your Git installation.

cd GITDIR # Where GITDIR is wherever inside Program Files you put Git
cp bin/git* /MINGW/bin # Where MINGW is wherever you put MinGW
cp -r libexec/git* /MINGW/libexec
cp -r share/git* /MINGW/share
share|improve this answer
1  
For anyone wondering, do not try to use the cygwin installer on the msysgit package. It partially works... but while resolving dependencies, it will replace sh.exe (which changes your environment significantly). – Chris Betti Jan 16 '15 at 15:10
    
How do I know if my git-bash use cygwin or msys ? – lmo yesterday

If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to you're the .bashrc file you are using for your Git installation:

    PATH=$PATH:/MINGW/msys/1.0/bin

...where MINGW is where you installed MinGW

That way you can use the MinGW tools directly from your Git bash installation, and if you need another bash tool you can just install it to MinGW.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .