Adding cmdline (win7) as an Eclipse console view

I’ve seen it in linux. There’s a console you can open that is just a shell. I want the same thing in windows only with either cmd, or with git bash. (MINGW32). I tried googling it but just got flooded with articles about egit and normal git bash.

  • Command line Git doesn't recognize keys generated using GitHub for Windows
  • git cannot execute python-script as hook
  • Using a network drive as git repository
  • How can I import a directory structure into SVN, keeping the file and folder modifed dates the same?
  • How to deal with Git Submodules in Visual Studio solutions with different layout?
  • How to run git fetch over ssh in a windows subprocess
  • Can git and subversion play nice together?
  • How to alias in git delete merged branches
  • One Solution collect form web for “Adding cmdline (win7) as an Eclipse console view”

    If you have msysgit, you can use it from a regular cmd session:

    Launch c:\windows\system32\cmd.exe /k <path\to\your\msysgit>\git-cmd.bat, and you can type in that cmd windows regular git commands.

    For a bash session: c:\windows\system32\cmd.exe /k <path\to\your\msysgit>\git-bash.bat.

    Note that you need to modify those bat:

    • git-cmd.bat: add a rem before the setlocal command, and before the start at the end.
    • git-bash.bat: add a rem before the setlocal command.

    So you can add to your Eclipse an external tool which will open a cmd in your console:

    http://www.avajava.com/tutorials/eclipse/how-do-i-open-a-windows-command-prompt-in-my-console/how-do-i-open-a-windows-command-prompt-in-my-console-03.gif

    Except, instead of calling C:\windows\system32\cmd.exe (in the “Location” field from the picture above), you could call directly: C:\windows\system32\cmd.exe /k <path\to\your\msysgit>\git-bash.bat.

    By ‘msysgit’, I refer to whatever name you gave to the uncompresdsed portable version of “Git For Windows”: download it there.

    And then you could type git command within the Eclipse console (including a bash session)!


    After testing, the color codes get in the way, even if git works:

    • git-cmd.bat:
      cmd

    • git-bash.bat:
      bash

    Git Baby is a git and github fan, let's start git clone.