From Git SCM Wiki
Revision as of 11:10, 29 November 2006 by LiuYuBao (Talk)

Jump to: navigation, search

Currently GIT is only supported on Windows within a Cygwin environment. While this works well, there are several efforts that aim to provide a more native GIT on Windows.

These efforts are

  • EclipseIDE-based GIT client, based on a pure Java implmentation of GIT's internals.
  • A libgit + cygwin.dll Windows Explorer extension (perhaps based on TortoiseSVN)

Ask on the MailingLists for the latest news on this ;-)

If you have the main development team on linux/unix, and peripheral developers or translators on Windows, consider using `git-cvsserver` to give those users read or read/write access to the GIT tree via the CVS protocol. Committers using `git-cvsserver` have some limits: they cannot branch, tag or merge. On the other hand, git-cvsserver works well with Eclipse, TortoiseCVS and other easy-to-use CVS clients.



You will need to install cygwin and the following packages to be able to build git:

  • rcs (for merge)
  • python (for merge-recursive, though merge-recur is a *huge* win)
  • wish (for gitk)
  • perl
  • ssh
  • openssl (and -dev)
  • zip (and -dev)
  • curl (and -dev)
  • expat (and -dev)
  • make
  • gcc
  • binutils (sorta necessary to compile!)
  • patchutils (at least for the tests)
  • cpio (at least for the tests)
  • xmlto to build the man pages
  • util-linux: just to have getopt (required by xmlto)
  • asciidoc to build documents (

With these packages installed you build git and install it in your ~/bin directory by doing:

make install

If want to be extra careful, you can always run the regression tests:

make test

You are now ready to use GIT. Check that your path includes ~/bin and you are off!

Extra notes

  • Use git on local NTFS disks -- Network drives and VFAT disks don't support the filesystem semantics GIT needs.
  • Be careful with the case in filenames. Similarly, avoid special chars in filenames.
  • Run git repack -a -d early and often. There are slowdowns with many unpacked objects.
  • As of version 1.4.x, export GIT_USE_RECUR_FOR_RECURSIVE=1 to replace Python-based git-merge-recursive with a much faster C implementation. Later versions will probably have the C version as default.
  • gitk has some pane layout problems. Try resizing the window. Try deleting your .gitk file.
  • Avoid using ActivePerl if possible. Ask in the MailingLists if you must.
  • Try to avoid interrupting (Ctrl-C) processes - it breaks cygwin.
  • Consider setting core.fileMode to false (git repo-config core.fileMode false) if file modes are frequently the only differences detected by Git. Many Windows applications make the execute bit be set in Cygwin when they save a file.
  • Insert "set CYGWIN=tty binmode" after the first line of C:\cygwin\cygwin.bat, so you can use Ctrl-z in cygwin's bash to suspend a program.

Personal tools