How to add more commands to Git Bash?












47














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?










share|improve this question




















  • 3




    What did you try?
    – 030
    Jul 22 '18 at 13:47






  • 3




    many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
    – 030
    Jul 22 '18 at 13:48






  • 2




    See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
    – nextgentech
    Jul 22 '18 at 20:51
















47














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?










share|improve this question




















  • 3




    What did you try?
    – 030
    Jul 22 '18 at 13:47






  • 3




    many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
    – 030
    Jul 22 '18 at 13:48






  • 2




    See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
    – nextgentech
    Jul 22 '18 at 20:51














47












47








47


16





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?










share|improve this question















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?







windows git-bash






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 22 '18 at 14:11









JakeGould

31k1093137




31k1093137










asked Jan 13 '14 at 17:44









Ankit Zalani

342135




342135








  • 3




    What did you try?
    – 030
    Jul 22 '18 at 13:47






  • 3




    many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
    – 030
    Jul 22 '18 at 13:48






  • 2




    See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
    – nextgentech
    Jul 22 '18 at 20:51














  • 3




    What did you try?
    – 030
    Jul 22 '18 at 13:47






  • 3




    many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
    – 030
    Jul 22 '18 at 13:48






  • 2




    See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
    – nextgentech
    Jul 22 '18 at 20:51








3




3




What did you try?
– 030
Jul 22 '18 at 13:47




What did you try?
– 030
Jul 22 '18 at 13:47




3




3




many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
– 030
Jul 22 '18 at 13:48




many utilities are missing in this version of bash shell. Please add what commands are missing that you would like to use.
– 030
Jul 22 '18 at 13:48




2




2




See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
– nextgentech
Jul 22 '18 at 20:51




See serverfault.com/a/872557/212162 for a much more recent and easier way of using utilities that aren't included by default.
– nextgentech
Jul 22 '18 at 20:51










9 Answers
9






active

oldest

votes


















14














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

















  • 2




    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






  • 5




    How do I know if my git-bash use cygwin or msys ?
    – lmo
    Jul 22 '16 at 8:49






  • 6




    I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
    – Limited Atonement
    Aug 19 '16 at 13:26








  • 2




    @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
    – Ioanna
    Sep 12 '16 at 11:11






  • 2




    @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
    – Limited Atonement
    Sep 12 '16 at 19:19



















4














If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to 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































    2














    With recent Git for Windows installations, installing additional shell scripts and programs is pretty easy.



    I recommend installing git using chocolatey choco install git, because you can update git (and all other tools installed with chocolatey) by executing choco upgrade all.



    Simply put the executables into C:Program FilesGitusrbin (%ProgramFiles%Gitusrbin).



    Example for git-fresh



    Copy the file git-fresh to C:Program FilesGitusrbin.



    Example for adr-tools




    1. Download a zip package from the releases page

    2. Unzip the package

    3. Copy everything from src/ into C:Program FilesGitusrbin






    share|improve this answer































      0














      If using Git bash for Windows (MinGW64), I had a very hard time getting rsync to be added to it. kept getting error: dup() in/out/err failed



      Instead, using Cygwin worked eventually.



      Steps I took to use rysnc in Gitbash for Windows




      1. Install gitbash for windows

      2. Install cygwin64

      3. Add the cygwin path to the Windows path variable


        Windows-> System->advanced Setings->Environment Variables




        Add a path for C:cygwin64bin





      4. Close and re-open gitbash
        Now gitbash will find the rsync.exe in the cygwinbin

      5. I was getting an incompatible version error for cygwin1.dll


        *** fatal error - cygheap base mismatch detected




      6. Although some said a reboot will fix this, it did not.

      7. To resolve the version error, I copied the cygwinbin directory from an older version of cygwin - version 1.7.30 worked






      share|improve this answer























      • Don't do this. See Use cygwin executable in git bash script for why.
        – MikeJRamsey56
        Sep 20 '18 at 14:44



















      0














      One could extend the number of features in git-bash by creating scripts and call them by defining them in the ~/.bash_profile file.



      Example



      If one would like to use the watch command, then this script could be added to the ~/.bash_profile:



      https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda




      ARGS="${@}"
      clear;
      while(true); do
      OUTPUT=`$ARGS`
      clear
      echo -e "${OUTPUT[@]}"
      done



      and wrap it inside a function:



      watch() {
      ARGS="${@}"
      clear;
      while(true); do
      OUTPUT=`$ARGS`
      clear
      echo -e "${OUTPUT[@]}"
      done
      }


      As soon as one saves the file and runs source ~/.bash_profile then one should be able to watch the output of commands.






      share|improve this answer































        0














        You can download additional Unix unitities Wget, Hugo, Xpdf, make, Nano from here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058



        Wget




        • Download the lastest wget binary for windows from eternallybored (they are available as a zip with documentation, or just an exe)

        • If you downloaded the zip, extract all (if windows built in zip utility gives an error, use 7-zip).

        • Rename the file wget64.exe to wget.exe if necessary.

        • Move wget.exe to your Gitmingw64bin.


        Note: I have noticed some bugs when using Wget on Git Bash to create WARC files. For more complex use of Wget, consider Cygwin instead.



        Hugo



        Hugo static site generator can be downloaded as a binary and does not have a installer.
        Dropping it into your bin easily adds it to your Git Bash path.
        Grab the Windows 64-bit version from the releases page.
        Unzip the download, then copy hugo.exe into your Gitmingw64bin directory.



        Xpdf



        Xpdf is a handy utility for manipulating PDF files.




        • Download the windows version "Xpdf tools".

        • Extract zip.

        • Copy the contents of xpdf-tools-win-4.00bin64 into your Gitmingw64bin.

        • Check the docs to get started with tools such as pdftotext and pdftopng.


        make




        • Go to ezwinports.

        • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).

        • Extract zip.

        • Copy the contents to your Gitmingw64 merging the folders, but do NOT overwrite/replace any existing files.


        Nano




        As of 2018, recent versions of Git Bash include Nano, so this is unnecessary!





        • Download the Nano binary from Nano win32-support page. You just need the .exe file, which is named nano-git-0d9a7347243.exe (as of this writing).

        • Rename the file to nano.exe, and copy to the mingw64bin directory.

        • This version of Nano will not work with Git Bash alone, but can be invoked using winpty, for example, winpty nano test.txt.






        share|improve this answer































          0















          install "Git for Windows SDK" (scroll to the bottom of https://gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)




          https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows/52105321#52105321






          share|improve this answer





























            0














            I found a pretty simple answer today that worked for rsync.




            1. Install git bash for Windows

            2. Download rsync from futureware.at*

            3. Extract to anywhere, I choose C:rsync-3.1.2-2-x86_64.pkg

            4. Add the bin folder to the top of your system path


            * I do not know who is behind futureware.at, I would prefer to link to a more primary source.






            share|improve this answer





















            • @mike your answer is similar, except that I didn't install cygwin64
              – geneorama
              Dec 6 '18 at 19:10



















            0















            I tried the following and installed emacs to git-bash..
            1. Install msys2 somewhere(does not have to be same computer).
            2. Under msys2, run the following:



               cd /tmp
            mkdir -p var/lib
            cp -R /var/lib/pacman var/lib/
            pacman -Sr /tmp emacs
            tar zcf emacs.tar.gz usr




            1. Copy emacs.tar.gz to where you can access from git-bash, then under git-bash:



              tar zxf emacs.tar.gz -C /
              emacs




            That's all, good luck.




            After the first post, I tried an other computer but not working. It turns out that some dlls is missing in git-bash. Then I tested in a clean virtual machine with the following steps:




            1. Install msys2-x86_64-20180531 and Git-2.19.1-64-bit.



            2. Update msys2, open msys64 console and run:



              pacman -Syyu


              Close msys64 console when prompted, then run the above command again.




            3. Get emacs files as the previous steps(run the following in msys64):



              cd /tmp
              mkdir -p var/lib
              cp -R /var/lib/pacman var/lib/
              pacman -Sr /tmp emacs
              tar zcf emacs.tar.gz usr
              mv emacs.tar.gz /c/tmp


              ps: I once tried the above steps in /d/tmp instead of /tmp and was not able to install emacs to it.




            4. Open git-bash and extract emacs files:



              cd /c/tmp
              tar zxf emacs.tar.gz -C /


              It will complain missing shared library "?" on trying to run emacs now. The "?" will not revealed to any readable




            5. Go back to msys64 and get the msys2 dlls's:



              ls --color=never /bin/*.dll > /c/tmp/1.txt



            6. In git-bash compare dlls with msys:



              cd /c/tmp
              git init
              git add 1.txt && git commit
              ls --color=never /bin/*.dll | sed 's#*$##g' > /c/tmp/1.txt
              git diff 1.txt | grep '^-' | sed '1d' | sed 's#^-/bin/##g' > diff_dlls.txt


              In my case, there are 26 dlls in diff_dlls.txt.




            7. Copy the dlls from msys64 to git-bash:



              In msys64:



              mkdir /c/tmp/dlls
              cat /c/tmp/diff_dlls.txt | xargs -I {} cp /bin/{} /c/tmp/dlls


              In git-bash:



              cp /c/tmp/dlls/* /bin


            8. All done, now emacs runs in git-bash. Some of the 26 dlls may not be necessary, but I'd prefer to save my time instead of disk space.







            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f701141%2fhow-to-add-more-commands-to-git-bash%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              9 Answers
              9






              active

              oldest

              votes








              9 Answers
              9






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              14














              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

















              • 2




                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






              • 5




                How do I know if my git-bash use cygwin or msys ?
                – lmo
                Jul 22 '16 at 8:49






              • 6




                I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
                – Limited Atonement
                Aug 19 '16 at 13:26








              • 2




                @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
                – Ioanna
                Sep 12 '16 at 11:11






              • 2




                @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
                – Limited Atonement
                Sep 12 '16 at 19:19
















              14














              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

















              • 2




                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






              • 5




                How do I know if my git-bash use cygwin or msys ?
                – lmo
                Jul 22 '16 at 8:49






              • 6




                I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
                – Limited Atonement
                Aug 19 '16 at 13:26








              • 2




                @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
                – Ioanna
                Sep 12 '16 at 11:11






              • 2




                @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
                – Limited Atonement
                Sep 12 '16 at 19:19














              14












              14








              14






              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












              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












              share|improve this answer



              share|improve this answer










              answered Jan 13 '14 at 18:53









              new123456

              3,3691319




              3,3691319








              • 2




                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






              • 5




                How do I know if my git-bash use cygwin or msys ?
                – lmo
                Jul 22 '16 at 8:49






              • 6




                I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
                – Limited Atonement
                Aug 19 '16 at 13:26








              • 2




                @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
                – Ioanna
                Sep 12 '16 at 11:11






              • 2




                @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
                – Limited Atonement
                Sep 12 '16 at 19:19














              • 2




                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






              • 5




                How do I know if my git-bash use cygwin or msys ?
                – lmo
                Jul 22 '16 at 8:49






              • 6




                I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
                – Limited Atonement
                Aug 19 '16 at 13:26








              • 2




                @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
                – Ioanna
                Sep 12 '16 at 11:11






              • 2




                @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
                – Limited Atonement
                Sep 12 '16 at 19:19








              2




              2




              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




              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




              5




              5




              How do I know if my git-bash use cygwin or msys ?
              – lmo
              Jul 22 '16 at 8:49




              How do I know if my git-bash use cygwin or msys ?
              – lmo
              Jul 22 '16 at 8:49




              6




              6




              I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
              – Limited Atonement
              Aug 19 '16 at 13:26






              I installed from git-scm.com/download/win is that msysgit or cygwin? EDIT Figured it out. Rather than delete this comment, I'll say that it's msysgit.
              – Limited Atonement
              Aug 19 '16 at 13:26






              2




              2




              @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
              – Ioanna
              Sep 12 '16 at 11:11




              @LimitedAtonement - Please also say how you figured it out, for other readers (like myself) who have asked themselves the same question.
              – Ioanna
              Sep 12 '16 at 11:11




              2




              2




              @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
              – Limited Atonement
              Sep 12 '16 at 19:19




              @Ioanna I think I asked in #git on freenode, and they gave a compelling argument. I'm now using Cygwin, and I'm as happy as I could be given the broken, virus-like OS :-)
              – Limited Atonement
              Sep 12 '16 at 19:19













              4














              If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to 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




























                4














                If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to 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


























                  4












                  4








                  4






                  If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to 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














                  If you are using msysgit a simple option is to just install MinGW and then add the MINGW path to 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














                  share|improve this answer



                  share|improve this answer








                  edited Jun 6 '17 at 10:09









                  Community

                  1




                  1










                  answered Feb 3 '16 at 18:35









                  Arnaldo C

                  411




                  411























                      2














                      With recent Git for Windows installations, installing additional shell scripts and programs is pretty easy.



                      I recommend installing git using chocolatey choco install git, because you can update git (and all other tools installed with chocolatey) by executing choco upgrade all.



                      Simply put the executables into C:Program FilesGitusrbin (%ProgramFiles%Gitusrbin).



                      Example for git-fresh



                      Copy the file git-fresh to C:Program FilesGitusrbin.



                      Example for adr-tools




                      1. Download a zip package from the releases page

                      2. Unzip the package

                      3. Copy everything from src/ into C:Program FilesGitusrbin






                      share|improve this answer




























                        2














                        With recent Git for Windows installations, installing additional shell scripts and programs is pretty easy.



                        I recommend installing git using chocolatey choco install git, because you can update git (and all other tools installed with chocolatey) by executing choco upgrade all.



                        Simply put the executables into C:Program FilesGitusrbin (%ProgramFiles%Gitusrbin).



                        Example for git-fresh



                        Copy the file git-fresh to C:Program FilesGitusrbin.



                        Example for adr-tools




                        1. Download a zip package from the releases page

                        2. Unzip the package

                        3. Copy everything from src/ into C:Program FilesGitusrbin






                        share|improve this answer


























                          2












                          2








                          2






                          With recent Git for Windows installations, installing additional shell scripts and programs is pretty easy.



                          I recommend installing git using chocolatey choco install git, because you can update git (and all other tools installed with chocolatey) by executing choco upgrade all.



                          Simply put the executables into C:Program FilesGitusrbin (%ProgramFiles%Gitusrbin).



                          Example for git-fresh



                          Copy the file git-fresh to C:Program FilesGitusrbin.



                          Example for adr-tools




                          1. Download a zip package from the releases page

                          2. Unzip the package

                          3. Copy everything from src/ into C:Program FilesGitusrbin






                          share|improve this answer














                          With recent Git for Windows installations, installing additional shell scripts and programs is pretty easy.



                          I recommend installing git using chocolatey choco install git, because you can update git (and all other tools installed with chocolatey) by executing choco upgrade all.



                          Simply put the executables into C:Program FilesGitusrbin (%ProgramFiles%Gitusrbin).



                          Example for git-fresh



                          Copy the file git-fresh to C:Program FilesGitusrbin.



                          Example for adr-tools




                          1. Download a zip package from the releases page

                          2. Unzip the package

                          3. Copy everything from src/ into C:Program FilesGitusrbin







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 16 '18 at 20:50









                          Lawrence Dol

                          1,40132540




                          1,40132540










                          answered Dec 8 '17 at 8:13









                          koppor

                          2071311




                          2071311























                              0














                              If using Git bash for Windows (MinGW64), I had a very hard time getting rsync to be added to it. kept getting error: dup() in/out/err failed



                              Instead, using Cygwin worked eventually.



                              Steps I took to use rysnc in Gitbash for Windows




                              1. Install gitbash for windows

                              2. Install cygwin64

                              3. Add the cygwin path to the Windows path variable


                                Windows-> System->advanced Setings->Environment Variables




                                Add a path for C:cygwin64bin





                              4. Close and re-open gitbash
                                Now gitbash will find the rsync.exe in the cygwinbin

                              5. I was getting an incompatible version error for cygwin1.dll


                                *** fatal error - cygheap base mismatch detected




                              6. Although some said a reboot will fix this, it did not.

                              7. To resolve the version error, I copied the cygwinbin directory from an older version of cygwin - version 1.7.30 worked






                              share|improve this answer























                              • Don't do this. See Use cygwin executable in git bash script for why.
                                – MikeJRamsey56
                                Sep 20 '18 at 14:44
















                              0














                              If using Git bash for Windows (MinGW64), I had a very hard time getting rsync to be added to it. kept getting error: dup() in/out/err failed



                              Instead, using Cygwin worked eventually.



                              Steps I took to use rysnc in Gitbash for Windows




                              1. Install gitbash for windows

                              2. Install cygwin64

                              3. Add the cygwin path to the Windows path variable


                                Windows-> System->advanced Setings->Environment Variables




                                Add a path for C:cygwin64bin





                              4. Close and re-open gitbash
                                Now gitbash will find the rsync.exe in the cygwinbin

                              5. I was getting an incompatible version error for cygwin1.dll


                                *** fatal error - cygheap base mismatch detected




                              6. Although some said a reboot will fix this, it did not.

                              7. To resolve the version error, I copied the cygwinbin directory from an older version of cygwin - version 1.7.30 worked






                              share|improve this answer























                              • Don't do this. See Use cygwin executable in git bash script for why.
                                – MikeJRamsey56
                                Sep 20 '18 at 14:44














                              0












                              0








                              0






                              If using Git bash for Windows (MinGW64), I had a very hard time getting rsync to be added to it. kept getting error: dup() in/out/err failed



                              Instead, using Cygwin worked eventually.



                              Steps I took to use rysnc in Gitbash for Windows




                              1. Install gitbash for windows

                              2. Install cygwin64

                              3. Add the cygwin path to the Windows path variable


                                Windows-> System->advanced Setings->Environment Variables




                                Add a path for C:cygwin64bin





                              4. Close and re-open gitbash
                                Now gitbash will find the rsync.exe in the cygwinbin

                              5. I was getting an incompatible version error for cygwin1.dll


                                *** fatal error - cygheap base mismatch detected




                              6. Although some said a reboot will fix this, it did not.

                              7. To resolve the version error, I copied the cygwinbin directory from an older version of cygwin - version 1.7.30 worked






                              share|improve this answer














                              If using Git bash for Windows (MinGW64), I had a very hard time getting rsync to be added to it. kept getting error: dup() in/out/err failed



                              Instead, using Cygwin worked eventually.



                              Steps I took to use rysnc in Gitbash for Windows




                              1. Install gitbash for windows

                              2. Install cygwin64

                              3. Add the cygwin path to the Windows path variable


                                Windows-> System->advanced Setings->Environment Variables




                                Add a path for C:cygwin64bin





                              4. Close and re-open gitbash
                                Now gitbash will find the rsync.exe in the cygwinbin

                              5. I was getting an incompatible version error for cygwin1.dll


                                *** fatal error - cygheap base mismatch detected




                              6. Although some said a reboot will fix this, it did not.

                              7. To resolve the version error, I copied the cygwinbin directory from an older version of cygwin - version 1.7.30 worked







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jul 27 '17 at 15:31

























                              answered Jul 26 '17 at 22:18









                              Mike

                              11




                              11












                              • Don't do this. See Use cygwin executable in git bash script for why.
                                – MikeJRamsey56
                                Sep 20 '18 at 14:44


















                              • Don't do this. See Use cygwin executable in git bash script for why.
                                – MikeJRamsey56
                                Sep 20 '18 at 14:44
















                              Don't do this. See Use cygwin executable in git bash script for why.
                              – MikeJRamsey56
                              Sep 20 '18 at 14:44




                              Don't do this. See Use cygwin executable in git bash script for why.
                              – MikeJRamsey56
                              Sep 20 '18 at 14:44











                              0














                              One could extend the number of features in git-bash by creating scripts and call them by defining them in the ~/.bash_profile file.



                              Example



                              If one would like to use the watch command, then this script could be added to the ~/.bash_profile:



                              https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda




                              ARGS="${@}"
                              clear;
                              while(true); do
                              OUTPUT=`$ARGS`
                              clear
                              echo -e "${OUTPUT[@]}"
                              done



                              and wrap it inside a function:



                              watch() {
                              ARGS="${@}"
                              clear;
                              while(true); do
                              OUTPUT=`$ARGS`
                              clear
                              echo -e "${OUTPUT[@]}"
                              done
                              }


                              As soon as one saves the file and runs source ~/.bash_profile then one should be able to watch the output of commands.






                              share|improve this answer




























                                0














                                One could extend the number of features in git-bash by creating scripts and call them by defining them in the ~/.bash_profile file.



                                Example



                                If one would like to use the watch command, then this script could be added to the ~/.bash_profile:



                                https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda




                                ARGS="${@}"
                                clear;
                                while(true); do
                                OUTPUT=`$ARGS`
                                clear
                                echo -e "${OUTPUT[@]}"
                                done



                                and wrap it inside a function:



                                watch() {
                                ARGS="${@}"
                                clear;
                                while(true); do
                                OUTPUT=`$ARGS`
                                clear
                                echo -e "${OUTPUT[@]}"
                                done
                                }


                                As soon as one saves the file and runs source ~/.bash_profile then one should be able to watch the output of commands.






                                share|improve this answer


























                                  0












                                  0








                                  0






                                  One could extend the number of features in git-bash by creating scripts and call them by defining them in the ~/.bash_profile file.



                                  Example



                                  If one would like to use the watch command, then this script could be added to the ~/.bash_profile:



                                  https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda




                                  ARGS="${@}"
                                  clear;
                                  while(true); do
                                  OUTPUT=`$ARGS`
                                  clear
                                  echo -e "${OUTPUT[@]}"
                                  done



                                  and wrap it inside a function:



                                  watch() {
                                  ARGS="${@}"
                                  clear;
                                  while(true); do
                                  OUTPUT=`$ARGS`
                                  clear
                                  echo -e "${OUTPUT[@]}"
                                  done
                                  }


                                  As soon as one saves the file and runs source ~/.bash_profile then one should be able to watch the output of commands.






                                  share|improve this answer














                                  One could extend the number of features in git-bash by creating scripts and call them by defining them in the ~/.bash_profile file.



                                  Example



                                  If one would like to use the watch command, then this script could be added to the ~/.bash_profile:



                                  https://gist.github.com/espaciomore/28e24ce4f91177c0964f4f67bb5c5fda




                                  ARGS="${@}"
                                  clear;
                                  while(true); do
                                  OUTPUT=`$ARGS`
                                  clear
                                  echo -e "${OUTPUT[@]}"
                                  done



                                  and wrap it inside a function:



                                  watch() {
                                  ARGS="${@}"
                                  clear;
                                  while(true); do
                                  OUTPUT=`$ARGS`
                                  clear
                                  echo -e "${OUTPUT[@]}"
                                  done
                                  }


                                  As soon as one saves the file and runs source ~/.bash_profile then one should be able to watch the output of commands.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Jul 22 '18 at 14:30

























                                  answered Jul 22 '18 at 14:07









                                  030

                                  93571533




                                  93571533























                                      0














                                      You can download additional Unix unitities Wget, Hugo, Xpdf, make, Nano from here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058



                                      Wget




                                      • Download the lastest wget binary for windows from eternallybored (they are available as a zip with documentation, or just an exe)

                                      • If you downloaded the zip, extract all (if windows built in zip utility gives an error, use 7-zip).

                                      • Rename the file wget64.exe to wget.exe if necessary.

                                      • Move wget.exe to your Gitmingw64bin.


                                      Note: I have noticed some bugs when using Wget on Git Bash to create WARC files. For more complex use of Wget, consider Cygwin instead.



                                      Hugo



                                      Hugo static site generator can be downloaded as a binary and does not have a installer.
                                      Dropping it into your bin easily adds it to your Git Bash path.
                                      Grab the Windows 64-bit version from the releases page.
                                      Unzip the download, then copy hugo.exe into your Gitmingw64bin directory.



                                      Xpdf



                                      Xpdf is a handy utility for manipulating PDF files.




                                      • Download the windows version "Xpdf tools".

                                      • Extract zip.

                                      • Copy the contents of xpdf-tools-win-4.00bin64 into your Gitmingw64bin.

                                      • Check the docs to get started with tools such as pdftotext and pdftopng.


                                      make




                                      • Go to ezwinports.

                                      • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).

                                      • Extract zip.

                                      • Copy the contents to your Gitmingw64 merging the folders, but do NOT overwrite/replace any existing files.


                                      Nano




                                      As of 2018, recent versions of Git Bash include Nano, so this is unnecessary!





                                      • Download the Nano binary from Nano win32-support page. You just need the .exe file, which is named nano-git-0d9a7347243.exe (as of this writing).

                                      • Rename the file to nano.exe, and copy to the mingw64bin directory.

                                      • This version of Nano will not work with Git Bash alone, but can be invoked using winpty, for example, winpty nano test.txt.






                                      share|improve this answer




























                                        0














                                        You can download additional Unix unitities Wget, Hugo, Xpdf, make, Nano from here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058



                                        Wget




                                        • Download the lastest wget binary for windows from eternallybored (they are available as a zip with documentation, or just an exe)

                                        • If you downloaded the zip, extract all (if windows built in zip utility gives an error, use 7-zip).

                                        • Rename the file wget64.exe to wget.exe if necessary.

                                        • Move wget.exe to your Gitmingw64bin.


                                        Note: I have noticed some bugs when using Wget on Git Bash to create WARC files. For more complex use of Wget, consider Cygwin instead.



                                        Hugo



                                        Hugo static site generator can be downloaded as a binary and does not have a installer.
                                        Dropping it into your bin easily adds it to your Git Bash path.
                                        Grab the Windows 64-bit version from the releases page.
                                        Unzip the download, then copy hugo.exe into your Gitmingw64bin directory.



                                        Xpdf



                                        Xpdf is a handy utility for manipulating PDF files.




                                        • Download the windows version "Xpdf tools".

                                        • Extract zip.

                                        • Copy the contents of xpdf-tools-win-4.00bin64 into your Gitmingw64bin.

                                        • Check the docs to get started with tools such as pdftotext and pdftopng.


                                        make




                                        • Go to ezwinports.

                                        • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).

                                        • Extract zip.

                                        • Copy the contents to your Gitmingw64 merging the folders, but do NOT overwrite/replace any existing files.


                                        Nano




                                        As of 2018, recent versions of Git Bash include Nano, so this is unnecessary!





                                        • Download the Nano binary from Nano win32-support page. You just need the .exe file, which is named nano-git-0d9a7347243.exe (as of this writing).

                                        • Rename the file to nano.exe, and copy to the mingw64bin directory.

                                        • This version of Nano will not work with Git Bash alone, but can be invoked using winpty, for example, winpty nano test.txt.






                                        share|improve this answer


























                                          0












                                          0








                                          0






                                          You can download additional Unix unitities Wget, Hugo, Xpdf, make, Nano from here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058



                                          Wget




                                          • Download the lastest wget binary for windows from eternallybored (they are available as a zip with documentation, or just an exe)

                                          • If you downloaded the zip, extract all (if windows built in zip utility gives an error, use 7-zip).

                                          • Rename the file wget64.exe to wget.exe if necessary.

                                          • Move wget.exe to your Gitmingw64bin.


                                          Note: I have noticed some bugs when using Wget on Git Bash to create WARC files. For more complex use of Wget, consider Cygwin instead.



                                          Hugo



                                          Hugo static site generator can be downloaded as a binary and does not have a installer.
                                          Dropping it into your bin easily adds it to your Git Bash path.
                                          Grab the Windows 64-bit version from the releases page.
                                          Unzip the download, then copy hugo.exe into your Gitmingw64bin directory.



                                          Xpdf



                                          Xpdf is a handy utility for manipulating PDF files.




                                          • Download the windows version "Xpdf tools".

                                          • Extract zip.

                                          • Copy the contents of xpdf-tools-win-4.00bin64 into your Gitmingw64bin.

                                          • Check the docs to get started with tools such as pdftotext and pdftopng.


                                          make




                                          • Go to ezwinports.

                                          • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).

                                          • Extract zip.

                                          • Copy the contents to your Gitmingw64 merging the folders, but do NOT overwrite/replace any existing files.


                                          Nano




                                          As of 2018, recent versions of Git Bash include Nano, so this is unnecessary!





                                          • Download the Nano binary from Nano win32-support page. You just need the .exe file, which is named nano-git-0d9a7347243.exe (as of this writing).

                                          • Rename the file to nano.exe, and copy to the mingw64bin directory.

                                          • This version of Nano will not work with Git Bash alone, but can be invoked using winpty, for example, winpty nano test.txt.






                                          share|improve this answer














                                          You can download additional Unix unitities Wget, Hugo, Xpdf, make, Nano from here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058



                                          Wget




                                          • Download the lastest wget binary for windows from eternallybored (they are available as a zip with documentation, or just an exe)

                                          • If you downloaded the zip, extract all (if windows built in zip utility gives an error, use 7-zip).

                                          • Rename the file wget64.exe to wget.exe if necessary.

                                          • Move wget.exe to your Gitmingw64bin.


                                          Note: I have noticed some bugs when using Wget on Git Bash to create WARC files. For more complex use of Wget, consider Cygwin instead.



                                          Hugo



                                          Hugo static site generator can be downloaded as a binary and does not have a installer.
                                          Dropping it into your bin easily adds it to your Git Bash path.
                                          Grab the Windows 64-bit version from the releases page.
                                          Unzip the download, then copy hugo.exe into your Gitmingw64bin directory.



                                          Xpdf



                                          Xpdf is a handy utility for manipulating PDF files.




                                          • Download the windows version "Xpdf tools".

                                          • Extract zip.

                                          • Copy the contents of xpdf-tools-win-4.00bin64 into your Gitmingw64bin.

                                          • Check the docs to get started with tools such as pdftotext and pdftopng.


                                          make




                                          • Go to ezwinports.

                                          • Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).

                                          • Extract zip.

                                          • Copy the contents to your Gitmingw64 merging the folders, but do NOT overwrite/replace any existing files.


                                          Nano




                                          As of 2018, recent versions of Git Bash include Nano, so this is unnecessary!





                                          • Download the Nano binary from Nano win32-support page. You just need the .exe file, which is named nano-git-0d9a7347243.exe (as of this writing).

                                          • Rename the file to nano.exe, and copy to the mingw64bin directory.

                                          • This version of Nano will not work with Git Bash alone, but can be invoked using winpty, for example, winpty nano test.txt.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Jul 22 '18 at 14:38

























                                          answered May 27 '18 at 17:48









                                          GKislin

                                          1093




                                          1093























                                              0















                                              install "Git for Windows SDK" (scroll to the bottom of https://gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)




                                              https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows/52105321#52105321






                                              share|improve this answer


























                                                0















                                                install "Git for Windows SDK" (scroll to the bottom of https://gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)




                                                https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows/52105321#52105321






                                                share|improve this answer
























                                                  0












                                                  0








                                                  0







                                                  install "Git for Windows SDK" (scroll to the bottom of https://gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)




                                                  https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows/52105321#52105321






                                                  share|improve this answer













                                                  install "Git for Windows SDK" (scroll to the bottom of https://gitforwindows.org/ which provides a link to download installer for it from https://github.com/git-for-windows/build-extra/releases/latest)




                                                  https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows/52105321#52105321







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Sep 5 '18 at 11:45









                                                  rofrol

                                                  1,037915




                                                  1,037915























                                                      0














                                                      I found a pretty simple answer today that worked for rsync.




                                                      1. Install git bash for Windows

                                                      2. Download rsync from futureware.at*

                                                      3. Extract to anywhere, I choose C:rsync-3.1.2-2-x86_64.pkg

                                                      4. Add the bin folder to the top of your system path


                                                      * I do not know who is behind futureware.at, I would prefer to link to a more primary source.






                                                      share|improve this answer





















                                                      • @mike your answer is similar, except that I didn't install cygwin64
                                                        – geneorama
                                                        Dec 6 '18 at 19:10
















                                                      0














                                                      I found a pretty simple answer today that worked for rsync.




                                                      1. Install git bash for Windows

                                                      2. Download rsync from futureware.at*

                                                      3. Extract to anywhere, I choose C:rsync-3.1.2-2-x86_64.pkg

                                                      4. Add the bin folder to the top of your system path


                                                      * I do not know who is behind futureware.at, I would prefer to link to a more primary source.






                                                      share|improve this answer





















                                                      • @mike your answer is similar, except that I didn't install cygwin64
                                                        – geneorama
                                                        Dec 6 '18 at 19:10














                                                      0












                                                      0








                                                      0






                                                      I found a pretty simple answer today that worked for rsync.




                                                      1. Install git bash for Windows

                                                      2. Download rsync from futureware.at*

                                                      3. Extract to anywhere, I choose C:rsync-3.1.2-2-x86_64.pkg

                                                      4. Add the bin folder to the top of your system path


                                                      * I do not know who is behind futureware.at, I would prefer to link to a more primary source.






                                                      share|improve this answer












                                                      I found a pretty simple answer today that worked for rsync.




                                                      1. Install git bash for Windows

                                                      2. Download rsync from futureware.at*

                                                      3. Extract to anywhere, I choose C:rsync-3.1.2-2-x86_64.pkg

                                                      4. Add the bin folder to the top of your system path


                                                      * I do not know who is behind futureware.at, I would prefer to link to a more primary source.







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Dec 6 '18 at 19:09









                                                      geneorama

                                                      4131512




                                                      4131512












                                                      • @mike your answer is similar, except that I didn't install cygwin64
                                                        – geneorama
                                                        Dec 6 '18 at 19:10


















                                                      • @mike your answer is similar, except that I didn't install cygwin64
                                                        – geneorama
                                                        Dec 6 '18 at 19:10
















                                                      @mike your answer is similar, except that I didn't install cygwin64
                                                      – geneorama
                                                      Dec 6 '18 at 19:10




                                                      @mike your answer is similar, except that I didn't install cygwin64
                                                      – geneorama
                                                      Dec 6 '18 at 19:10











                                                      0















                                                      I tried the following and installed emacs to git-bash..
                                                      1. Install msys2 somewhere(does not have to be same computer).
                                                      2. Under msys2, run the following:



                                                         cd /tmp
                                                      mkdir -p var/lib
                                                      cp -R /var/lib/pacman var/lib/
                                                      pacman -Sr /tmp emacs
                                                      tar zcf emacs.tar.gz usr




                                                      1. Copy emacs.tar.gz to where you can access from git-bash, then under git-bash:



                                                        tar zxf emacs.tar.gz -C /
                                                        emacs




                                                      That's all, good luck.




                                                      After the first post, I tried an other computer but not working. It turns out that some dlls is missing in git-bash. Then I tested in a clean virtual machine with the following steps:




                                                      1. Install msys2-x86_64-20180531 and Git-2.19.1-64-bit.



                                                      2. Update msys2, open msys64 console and run:



                                                        pacman -Syyu


                                                        Close msys64 console when prompted, then run the above command again.




                                                      3. Get emacs files as the previous steps(run the following in msys64):



                                                        cd /tmp
                                                        mkdir -p var/lib
                                                        cp -R /var/lib/pacman var/lib/
                                                        pacman -Sr /tmp emacs
                                                        tar zcf emacs.tar.gz usr
                                                        mv emacs.tar.gz /c/tmp


                                                        ps: I once tried the above steps in /d/tmp instead of /tmp and was not able to install emacs to it.




                                                      4. Open git-bash and extract emacs files:



                                                        cd /c/tmp
                                                        tar zxf emacs.tar.gz -C /


                                                        It will complain missing shared library "?" on trying to run emacs now. The "?" will not revealed to any readable




                                                      5. Go back to msys64 and get the msys2 dlls's:



                                                        ls --color=never /bin/*.dll > /c/tmp/1.txt



                                                      6. In git-bash compare dlls with msys:



                                                        cd /c/tmp
                                                        git init
                                                        git add 1.txt && git commit
                                                        ls --color=never /bin/*.dll | sed 's#*$##g' > /c/tmp/1.txt
                                                        git diff 1.txt | grep '^-' | sed '1d' | sed 's#^-/bin/##g' > diff_dlls.txt


                                                        In my case, there are 26 dlls in diff_dlls.txt.




                                                      7. Copy the dlls from msys64 to git-bash:



                                                        In msys64:



                                                        mkdir /c/tmp/dlls
                                                        cat /c/tmp/diff_dlls.txt | xargs -I {} cp /bin/{} /c/tmp/dlls


                                                        In git-bash:



                                                        cp /c/tmp/dlls/* /bin


                                                      8. All done, now emacs runs in git-bash. Some of the 26 dlls may not be necessary, but I'd prefer to save my time instead of disk space.







                                                      share|improve this answer




























                                                        0















                                                        I tried the following and installed emacs to git-bash..
                                                        1. Install msys2 somewhere(does not have to be same computer).
                                                        2. Under msys2, run the following:



                                                           cd /tmp
                                                        mkdir -p var/lib
                                                        cp -R /var/lib/pacman var/lib/
                                                        pacman -Sr /tmp emacs
                                                        tar zcf emacs.tar.gz usr




                                                        1. Copy emacs.tar.gz to where you can access from git-bash, then under git-bash:



                                                          tar zxf emacs.tar.gz -C /
                                                          emacs




                                                        That's all, good luck.




                                                        After the first post, I tried an other computer but not working. It turns out that some dlls is missing in git-bash. Then I tested in a clean virtual machine with the following steps:




                                                        1. Install msys2-x86_64-20180531 and Git-2.19.1-64-bit.



                                                        2. Update msys2, open msys64 console and run:



                                                          pacman -Syyu


                                                          Close msys64 console when prompted, then run the above command again.




                                                        3. Get emacs files as the previous steps(run the following in msys64):



                                                          cd /tmp
                                                          mkdir -p var/lib
                                                          cp -R /var/lib/pacman var/lib/
                                                          pacman -Sr /tmp emacs
                                                          tar zcf emacs.tar.gz usr
                                                          mv emacs.tar.gz /c/tmp


                                                          ps: I once tried the above steps in /d/tmp instead of /tmp and was not able to install emacs to it.




                                                        4. Open git-bash and extract emacs files:



                                                          cd /c/tmp
                                                          tar zxf emacs.tar.gz -C /


                                                          It will complain missing shared library "?" on trying to run emacs now. The "?" will not revealed to any readable




                                                        5. Go back to msys64 and get the msys2 dlls's:



                                                          ls --color=never /bin/*.dll > /c/tmp/1.txt



                                                        6. In git-bash compare dlls with msys:



                                                          cd /c/tmp
                                                          git init
                                                          git add 1.txt && git commit
                                                          ls --color=never /bin/*.dll | sed 's#*$##g' > /c/tmp/1.txt
                                                          git diff 1.txt | grep '^-' | sed '1d' | sed 's#^-/bin/##g' > diff_dlls.txt


                                                          In my case, there are 26 dlls in diff_dlls.txt.




                                                        7. Copy the dlls from msys64 to git-bash:



                                                          In msys64:



                                                          mkdir /c/tmp/dlls
                                                          cat /c/tmp/diff_dlls.txt | xargs -I {} cp /bin/{} /c/tmp/dlls


                                                          In git-bash:



                                                          cp /c/tmp/dlls/* /bin


                                                        8. All done, now emacs runs in git-bash. Some of the 26 dlls may not be necessary, but I'd prefer to save my time instead of disk space.







                                                        share|improve this answer


























                                                          0












                                                          0








                                                          0







                                                          I tried the following and installed emacs to git-bash..
                                                          1. Install msys2 somewhere(does not have to be same computer).
                                                          2. Under msys2, run the following:



                                                             cd /tmp
                                                          mkdir -p var/lib
                                                          cp -R /var/lib/pacman var/lib/
                                                          pacman -Sr /tmp emacs
                                                          tar zcf emacs.tar.gz usr




                                                          1. Copy emacs.tar.gz to where you can access from git-bash, then under git-bash:



                                                            tar zxf emacs.tar.gz -C /
                                                            emacs




                                                          That's all, good luck.




                                                          After the first post, I tried an other computer but not working. It turns out that some dlls is missing in git-bash. Then I tested in a clean virtual machine with the following steps:




                                                          1. Install msys2-x86_64-20180531 and Git-2.19.1-64-bit.



                                                          2. Update msys2, open msys64 console and run:



                                                            pacman -Syyu


                                                            Close msys64 console when prompted, then run the above command again.




                                                          3. Get emacs files as the previous steps(run the following in msys64):



                                                            cd /tmp
                                                            mkdir -p var/lib
                                                            cp -R /var/lib/pacman var/lib/
                                                            pacman -Sr /tmp emacs
                                                            tar zcf emacs.tar.gz usr
                                                            mv emacs.tar.gz /c/tmp


                                                            ps: I once tried the above steps in /d/tmp instead of /tmp and was not able to install emacs to it.




                                                          4. Open git-bash and extract emacs files:



                                                            cd /c/tmp
                                                            tar zxf emacs.tar.gz -C /


                                                            It will complain missing shared library "?" on trying to run emacs now. The "?" will not revealed to any readable




                                                          5. Go back to msys64 and get the msys2 dlls's:



                                                            ls --color=never /bin/*.dll > /c/tmp/1.txt



                                                          6. In git-bash compare dlls with msys:



                                                            cd /c/tmp
                                                            git init
                                                            git add 1.txt && git commit
                                                            ls --color=never /bin/*.dll | sed 's#*$##g' > /c/tmp/1.txt
                                                            git diff 1.txt | grep '^-' | sed '1d' | sed 's#^-/bin/##g' > diff_dlls.txt


                                                            In my case, there are 26 dlls in diff_dlls.txt.




                                                          7. Copy the dlls from msys64 to git-bash:



                                                            In msys64:



                                                            mkdir /c/tmp/dlls
                                                            cat /c/tmp/diff_dlls.txt | xargs -I {} cp /bin/{} /c/tmp/dlls


                                                            In git-bash:



                                                            cp /c/tmp/dlls/* /bin


                                                          8. All done, now emacs runs in git-bash. Some of the 26 dlls may not be necessary, but I'd prefer to save my time instead of disk space.







                                                          share|improve this answer















                                                          I tried the following and installed emacs to git-bash..
                                                          1. Install msys2 somewhere(does not have to be same computer).
                                                          2. Under msys2, run the following:



                                                             cd /tmp
                                                          mkdir -p var/lib
                                                          cp -R /var/lib/pacman var/lib/
                                                          pacman -Sr /tmp emacs
                                                          tar zcf emacs.tar.gz usr




                                                          1. Copy emacs.tar.gz to where you can access from git-bash, then under git-bash:



                                                            tar zxf emacs.tar.gz -C /
                                                            emacs




                                                          That's all, good luck.




                                                          After the first post, I tried an other computer but not working. It turns out that some dlls is missing in git-bash. Then I tested in a clean virtual machine with the following steps:




                                                          1. Install msys2-x86_64-20180531 and Git-2.19.1-64-bit.



                                                          2. Update msys2, open msys64 console and run:



                                                            pacman -Syyu


                                                            Close msys64 console when prompted, then run the above command again.




                                                          3. Get emacs files as the previous steps(run the following in msys64):



                                                            cd /tmp
                                                            mkdir -p var/lib
                                                            cp -R /var/lib/pacman var/lib/
                                                            pacman -Sr /tmp emacs
                                                            tar zcf emacs.tar.gz usr
                                                            mv emacs.tar.gz /c/tmp


                                                            ps: I once tried the above steps in /d/tmp instead of /tmp and was not able to install emacs to it.




                                                          4. Open git-bash and extract emacs files:



                                                            cd /c/tmp
                                                            tar zxf emacs.tar.gz -C /


                                                            It will complain missing shared library "?" on trying to run emacs now. The "?" will not revealed to any readable




                                                          5. Go back to msys64 and get the msys2 dlls's:



                                                            ls --color=never /bin/*.dll > /c/tmp/1.txt



                                                          6. In git-bash compare dlls with msys:



                                                            cd /c/tmp
                                                            git init
                                                            git add 1.txt && git commit
                                                            ls --color=never /bin/*.dll | sed 's#*$##g' > /c/tmp/1.txt
                                                            git diff 1.txt | grep '^-' | sed '1d' | sed 's#^-/bin/##g' > diff_dlls.txt


                                                            In my case, there are 26 dlls in diff_dlls.txt.




                                                          7. Copy the dlls from msys64 to git-bash:



                                                            In msys64:



                                                            mkdir /c/tmp/dlls
                                                            cat /c/tmp/diff_dlls.txt | xargs -I {} cp /bin/{} /c/tmp/dlls


                                                            In git-bash:



                                                            cp /c/tmp/dlls/* /bin


                                                          8. All done, now emacs runs in git-bash. Some of the 26 dlls may not be necessary, but I'd prefer to save my time instead of disk space.








                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited Dec 8 '18 at 15:41

























                                                          answered Oct 29 '18 at 16:08









                                                          chenxin

                                                          11




                                                          11






























                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Super User!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.





                                                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                              Please pay close attention to the following guidance:


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f701141%2fhow-to-add-more-commands-to-git-bash%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Terni

                                                              A new problem with tex4ht and tikz

                                                              Sun Ra