Fix msysGit Portable $HOME location

The command used to launch git bash is: C:\Windows\SysWOW64\cmd.exe /c “”C:\Prog\Git\1.7.1\bin\sh.exe” –login -i” I just tried the following in a DOS session: C:\>C:\Windows\SysWOW64\cmd.exe /c “”C:\Prog\Git\1.7.1\bin\sh.exe” –login -i” VonC@XXX /c/ $ echo $HOME /c/Users/VonC By default, $HOME$%HOMEPATH%, but if I force %HOME%: set HOME=/another/path and then launch the same bash session: C:\>C:\Windows\SysWOW64\cmd.exe /c “”C:\Prog\Git\1.7.1\bin\sh.exe” –login -i” … Read more

Msysgit bash is horrendously slow in Windows 7

You can significantly speed up Git on Windows by running three commands to set some config options: git config –global core.preloadindex true git config –global core.fscache true git config –global gc.auto 256 Notes: core.preloadindex does filesystem operations in parallel to hide latency (update: enabled by default in git 2.1) core.fscache fixes UAC issues so you … Read more

use Winmerge inside of Git to file diff

Update June 2015, 6 years later: As detailed in “git mergetool winmerge“, a simple git config diff.tool winmerge will be enough. Git 2.5+ (Q2, 2015) is now aware of Winmerge as a diff or merge tool! Original answer (2009-2012) (msysgit, 1.6.5, DOS session) The first part (using winmerge) is described in “How do I view … Read more

How do I use Notepad++ (or other) with msysgit?

git config –global core.editor “‘C:/Program Files/Notepad++/notepad++.exe’ -multiInst -notabbar -nosession -noPlugin” Or, for 64-bit Windows and a 32-bit install of Notepad++: git config –global core.editor “‘C:/Program Files (x86)/Notepad++/notepad++.exe’ -multiInst -notabbar -nosession -noPlugin” Or, the following can be issued on the command line on either 32-bit or 64-bit Windows. It will pull the location of notepad++.exe from … Read more

Git on Windows: How do you set up a mergetool?

To follow-up on Charles Bailey’s answer, here’s my git setup that’s using p4merge (free cross-platform 3way merge tool); tested on msys Git (Windows) install: git config –global merge.tool p4merge git config –global mergetool.p4merge.cmd ‘p4merge.exe \”$BASE\” \”$LOCAL\” \”$REMOTE\” \”$MERGED\”‘ or, from a windows cmd.exe shell, the second line becomes : git config –global mergetool.p4merge.cmd “p4merge.exe \”$BASE\” … Read more