There are two ways of changing git configuration options

1) using "git config" to change the current repository's configuration, and
"git config --global" to change global configuration.

2) Editing $GIT_TOPDIR/.git/config (.git can be found with "git rev-parse
--git-dir") to change the current repository's configuration, and editing
~/.gitconfig for the global configuration.

You can list all currently set configuration options with "git var -l".

------------------------

Config options which should be set for the Crawl repository, but probably
shouldn't be global config options:

* Always rebase when doing a pull:
      git config branch.master.rebase true

* Always rebase when setting up a new branch:
      git config branch.autosetuprebase always

* Don't translate line endings to the native format. Necessary for
  Visual Studio projects:
      git config core.autocrlf false

------------------------

Some useful config options:

* Automatically colour all output which can be coloured:
      git config --global color.ui auto

* Automatically fix whitespace problems in a patch if using the
  "apply" command:
      git config --global apply.whitespace fix

* Use more than one thread for packing when doing a push or gc.
  Useful on multi-processor or dual-core machines:
      git config --global pack.threads 2

-------------------------
Install a pre-commit sanity check

From the root of the git tree type:
cp crawl-ref/docs/develop/git/pre-commit .git/hooks

-------------------------

Nice hunk markers for .des files:

Add this to .git/config:

[diff "des"]
        xfuncname = ".*\\{\\{.*"
        xfuncname = "^NAME:.*$"

Combined with the *.des entry in crawl-ref/.gitattributes, this will
cause "git diff" to include helpful headers in each hunk (after the
second @@), like so:

--- a/crawl-ref/source/dat/des/builder/uniques.des
+++ b/crawl-ref/source/dat/des/builder/uniques.des
@@ -405,8 +405,8 @@ NAME:    uniq_crazy_yiuf_cottage
 SUBST:   P:PQ;; , Q=2;
 NSUBST:  P=1:t / *:2;
 # Randomisation 4: Hammers. Hammers. Hammers.
-SUBST:   ; : .:100 ;:10 2:d
-SUBST:   ; = .:10 2:d
+SUBST:   ; : .:100 ;:10 d:2
+SUBST:   ; = .:10 d:2
 : if crawl.one_chance_in(300) then
 SUBST:   t="
 : end
