WindowsInstall

From Git SCM Wiki
(Difference between revisions)
Jump to: navigation, search
(Talk)
(Talk)
Line 2: Line 2:
  
 
These efforts are
 
These efforts are
* MinGW-based recompilation
+
* [http://repo.or.cz/w/git/mingw.git MinGW-based recompilation]
 
* EclipseIDE-based GIT client, based on a pure Java implmentation of GIT's internals.
 
* 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)
 
* A libgit + cygwin.dll Windows Explorer extension (perhaps based on TortoiseSVN)
Line 15: Line 15:
 
You will need to install cygwin and the following packages to be able to build git:
 
You will need to install cygwin and the following packages to be able to build git:
  
* rcs (for merge)
+
* wish (for gitk and git-gui)
* python (for merge-recursive, though merge-recur is a *huge* win)
+
* wish (for gitk)
+
 
* perl
 
* perl
 
* openssh
 
* openssh
Line 23: Line 21:
 
* libiconv
 
* libiconv
 
* zip (and -dev)
 
* zip (and -dev)
* curl (and -dev)
+
* curl (and -dev), optional if compiled with NO_CURL=1
* expat (and -dev)
+
* expat (and -dev), optional if compiled with NO_CURL=1
 
* make
 
* make
 
* gcc
 
* gcc
Line 33: Line 31:
 
* util-linux: just to have getopt (required by xmlto)
 
* util-linux: just to have getopt (required by xmlto)
 
* asciidoc to build documents (http://www.methods.co.nz/asciidoc/INSTALL.html)
 
* asciidoc to build documents (http://www.methods.co.nz/asciidoc/INSTALL.html)
 +
* python to build documents
  
 
With these packages installed download the git source package from the git homepage and then unpack it with:
 
With these packages installed download the git source package from the git homepage and then unpack it with:
Line 56: Line 55:
  
 
* Use git on local NTFS disks -- Network drives disks don't support the filesystem semantics GIT needs.
 
* Use git on local NTFS disks -- Network drives disks don't support the filesystem semantics GIT needs.
* To use git on a local FAT32 disk, export NO_MMAP=1 -- see the email thread "Can git be tweaked to work cross-platform, on FAT32?" http://marc.theaimsgroup.com/?t=116602585500004&r=1&w=2
 
 
* Be careful with the case in filenames. Similarly, avoid special chars in filenames.  
 
* 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.
+
* Run git gc 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.
 
* Avoid using ActivePerl if possible. Ask in the [[MailingLists]] if you must.
 
* Try to avoid interrupting (Ctrl-C) processes - it breaks cygwin.
 
* Try to avoid interrupting (Ctrl-C) processes - it breaks cygwin.

Revision as of 19:32, 26 February 2007

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

  • MinGW-based recompilation
  • 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.

Cygwin

Installation

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

  • wish (for gitk and git-gui)
  • perl
  • openssh
  • openssl (and -dev)
  • libiconv
  • zip (and -dev)
  • curl (and -dev), optional if compiled with NO_CURL=1
  • expat (and -dev), optional if compiled with NO_CURL=1
  • make
  • gcc
  • binutils (sorta necessary to compile!)
  • patchutils (at least for the t4109-apply-multifrag.sh tests)
  • cpio (at least for the t5400-send-pack.sh tests)
  • xmlto to build the man pages
  • util-linux: just to have getopt (required by xmlto)
  • asciidoc to build documents (http://www.methods.co.nz/asciidoc/INSTALL.html)
  • python to build documents

With these packages installed download the git source package from the git homepage and then unpack it with:

tar xvzf git-x.y.z.tar.gz   (or tar xvjf git-x.y.z.tar.bz2)

Then, 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 disks don't support the filesystem semantics GIT needs.
  • Be careful with the case in filenames. Similarly, avoid special chars in filenames.
  • Run git gc early and often. There are slowdowns with many unpacked objects.
  • 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.
  • Windows usually writes end-of-line as CRLF, while Unix/POSIX writes LF. This can cause a variety of problems. There are current efforts to address this.


Personal tools