Recently write C # from Linux up and down to Windows. It feels a great difference. The biggest change is---a variety of GUI tools ah ... Everywhere, a variety of search menus. Not used!! Miss BSH's Flexibility AH ~ ~ ~
Why to use Git
Git is the most popular version manager of the moment. A lot of benefits, but the most important thing is actually a little
- Without always accessing the server, everyone has an entire warehouse
PS: Git is probably the boss's favorite, we can not even go home to work on the server or at home to do a commit ah ...:(
The Git on window
Git is developed from the Linux platform. The feature of the Linux platform is that everyone is knocking on the command line. So the Windows version of Git comes with bash based on Msys. This bash opens a simple window that simulates the Linux command environment in Windows.
This pig is a code farmer who goes from Linux to the Windows environment and is very nostalgic for bash. Born to be a dog, the most dislike of Git's GUI tools is the feeling of always having to leave the keyboard with a hand.
Kill the Ugly cmd.
But the cmd window was so shabby that it was horrible. seriously corrupt mood.
After using the bare Ben's bsh has been missing Cygwin under the mintty. But it seems too heavy for a mintty to install a cygwin of n G. Fortunately, someone singled out Mintty. Really good ah, only need to copy an EXE file can be used!!
Since it's for Msys and Cygwin, you should be able to run Git bash. Try it, sure enough.
Steps
- Install git Windows version First (nonsense)
- Go to [Google code here] (mintty download Mintty
- Unzip Mintty.exe to {git's installation directory}\bin, this bin directory has the key Bash.exe
Put a shortcut on the desktop, the target points to mintty, plus some parameters, with my Win7 64 as an example:
"C:\Program Files (x86)\Git\bin\mintty.exe" /bin/sh --login -i
Run. All ok! and CMD say 88!
Well, wait a minute . If you go to set the properties of the Mintty window, nine to ten will pop up with an error box telling you that you can't find/home/{username}, just like this
With hints, the solution is simple. In the GIT installation directory, create a new subdirectory: Home{username}. For example, log in as Administrator and create a new directory home\administrator. The following commands can also be entered directly in the Mintty:
mkdir -p /home/$USERNAME
Then go to setup mintty, and you'll find a. minttyrc file in the/home/$USERNAME directory. This is the saved settings file. (Like most Linux programs, it's text, there's no Damn registry)
Finally see the familiar green word black bottom, tears ran ...
Add Mintty to the right-click menu
Save the following code to the. reg file and then inject the registry (the Mintty.exe directory is modified by itself)
Windows Registry Editor Version 5.00 [HKEYCLASSESROOT\folder\shell\minttyshell] @="Open Mintty Prompt Here" [HKEYCLASSESROOT\folder\shell\minttyshell\command] @="\"C:\Program Files (x86)\Git\bin\mintty.exe\" /bin/env CHEREINVOKING=1 /bin/bash -l -i" [HKEYCLASSESROOT\Directory\shell\minttyshell] @="Open Mintty Prompt Here" [HKEYCLASSESROOT\Directory\shell\minttyshell\command] @="\"C:\Program Files (x86)\Git\bin\mintty.exe\" /bin/env CHEREINVOKING=1 /bin/bash -l -i" [HKEYCLASSESROOT\Directory\Background\shell\minttyshell] @="Open Mintty Prompt Here" [HKEYCLASSESROOT\Directory\Background\shell\minttyshell\command] @="\"C:\Program Files (x86)\Git\bin\mintty.exe\" /bin/env CHERE_INVOKING=1 /bin/bash -l -i"
Small shortfall
Git Bash's own VI does not work properly in mintty. However, this problem can be solved by installing gvim yourself. Install the Gvim and add the path to the Gvim.exe location.