|
|
Git on MSys
Git is a powerful Source Code Management tool, which was created out of the need to replace BitKeeper -- quickly! -- with something else for the Linux kernel development.
In the meantime it has evolved to be one of the best SCMs around.
Unfortunately, Git on Windows is only officially supported using Cygwin. However, there is a fork (currently in the process of being merged with "official" git) which enables you to compile git using MinGW/MSys.
This project aims to make installing this port easy.
How to install it
Basically, there are two different types of packages: Git and msysGit. The former is the Git distribution, meant for the end user. If you want to hack on Git, though, you want msysGit: it includes not only the sources for Git, but the complete development environment you need (sans Windows)!
If you only want to use Git
- Get Git from the download area. Install it, be happy.
Note: this package was known as WinGit, back in the ice age of this project.
If you want to hack on Git
- Get msysGit-netinstall from the download area.
- Run it.
- It will clone msysgit.git and 4msysgit.git (our custom fork of mingw.git) and set it up automatically for you!
Note: in the dim, dark ages of this project, the name for msysGit-netinstall was GitMe. It was confusing, and we cleaned up our act since.
If you want to hack on Git, but cannot use the netinstaller
Note: this is not the preferred way, as it does not set up the repositories for msysGit and git, and does not fetch the histories from repo.or.cz. However, some people cannot freely access the internet, not even with an HTTP proxy. If this applies to you, this is the installer we intended for you. In the olden days of this project, it was the only available package, "msysGit", originally not even an installer, but a 48MB zip file!
- Get msysGit-fullinstall from the Download area.
- Run it, or if you are uncomfortable running executables, get http://www.7-zip.org and extract it. (Sidenote: If you are still stuck with WinZip and its nagging screen, why don't you change? 7zip can do everything WinZip can, and more, and it is OpenSource, and there is no nagging screen, and it can compress better, and...)
- Extract anywhere you like (although it was only really tested on C:\)
- Go into that directory and double click on msys.bat
- It will compile & install git (only in MSys, no need to fear), then welcomes you with a note that all is ready
- Have fun! (Or, in other words, RTFM!)
How to participate
Testing and reporting bugs is really already a big help. Of course, it is even better if you get involved, for example by hacking on mingw.git.
Once you installed msysGit, git will be compiled and the repository will be fetched, so you are good to go. Play with git a little, and you will find plenty of stuff that is not quite optimal.
For example, there is an Rxvt (a terminal window which is resizable, has a scrollback that you can trigger by Shift+PageUp, and text is easily selectable and pastable) which you can start by clicking on msys-rxvt.bat in the bin/ folder. However, with Rxvt, these issues are most apparent:
- pushing via ssh is not working right now, it seems,
- the pager is not called correctly (it is not connected to a tty),
- stderr does not seem to be shown,
- when vi is called as the editor for the commit messages, it does not get any input,
- etc.
So while Rxvt is arguably nicer than cmd, it is not recommended at this time to use it.
The good news is that you can fetch via git:// protocol, and using msys.bat, you can use the ssh protocol (NOTE: at the moment, the only syntax that works is "git+ssh://<host>/<path>"; the common syntax "<host>:<path>" will not work!).
In most cases, you can work around bugs in msysGit by using cygwin. Yes, that works (only the index will be dirty all the time, since Cygwin and MinGW have different ideas about the stat data).
If you feel something could be better with the installer, or if you want to make an installer which contains just git, please initialize like this:
- /share/msysGit/initialize.sh
This will initialize a git repository in /.git, and update your complete msysGit to the current version.
Once you made some changes, you can even push into the 'mob' branch on repo.or.cz:
- git push ssh://mob@repo.or.cz/srv/git/msysgit.git master:mob
How not to participate
So you do not want to help? Then there is nothing to see here, please move along.
How to restart msysGit
So you installed msysGit, but closed the window, and cannot find a way to restart it? No need to fear, just execute "msys.bat" in the directory you installed to.
To make it more convenient, you can install a QuickLaunch shortcut with "/share/msysGit/add-shortcut.tcl".
How to remake the installer
- Inside MSys, run the script like this: "/share/msysGit-fullinstall/release.sh <version>"
- The result will be in your home directory.
Evil plans
The plan is to attract enough Windows developers so that several lieutenants can be assigned for tasks such as "make and maintain an easy-to-use installer" (this position is competently held by Steffen; with support from Sebastian), "handle bug reports efficiently", and even "build and maintain a TortoiseCVS lookalike" (the beginnings of which are already progressing, in http://repo.or.cz/w/git-cheetah.git/).
