Page History

Turn Off History

Tricks

Windows

Add a splash of color to your git output

For those who grew up with DOS, you'll probably recall the delight when it become possible to color the terminal characters. This feature has long since been disabled: as more and more people prefer are using the GUI rather than the command line to do their work. However, it is still possible to turn those lovely colors back on, if you are so inclined. To do this, simply add the following line in %SystemDrive%\config.sys (or config.nt for older versions of NT):

  DEVICE=%SystemRoot%\system32\ANSI.SYS

That is it. After you're done reboot and tell git to use colors. It will now highlight important information for you. To enable this for all "colorable" git commands, issue the following:

  git config --global color.branch "always"

Trouble Shooting

Merging

File renaming problems

If, while merging, you encounter the following scary message:

  warning: too many files, skipping inexact rename detection

You'll get a whole lot of merge conflicts which one would imagine git could have take care of. The problem, at least in my case, is that because detecting file name changes is currently an O(n^2) operation which may take a long time, especially when you take into account the number of files in our repository. As such, git defines an upper limit on the search, so that it will stop after m iteration. This limit can be set by changing the value of diff.renamelimit to something higher. 400, in my case, seemed to do the trick.