| | 119 | |
| | 120 | == Speedup Git on Windows == |
| | 121 | |
| | 122 | Git tends to be rather slow for repositories with a huge amount of files on Windows. |
| | 123 | One way to deal with that is to use a sparse-checkout, to "ignore" certain files. |
| | 124 | The ''LayoutTests'' directory is certainly a good candidate, if you currently do not need these files. |
| | 125 | A sparse-checkout uses a config file (''.git/info/sparse-checkout'') to determine if a file should be checked out or not. |
| | 126 | Files mentioned in the config file will be part of the checkout. |
| | 127 | Files not mentioned in the config file will be ignored. |
| | 128 | There is also a syntax to invert this logic, but it is currently not working well with directories. |
| | 129 | |
| | 130 | 1. Create a ''sparse-checkout'' file with all the files/directories that you need. You can use the following command in git-bash to create such a file that will ignore the ''LayoutTests'' directory. |
| | 131 | {{{ |
| | 132 | cd WebKit |
| | 133 | ls -a | grep ".[a-zA-Z]" | grep -Ev "^.git|LayoutTests$" > .git/info/sparse-checkout |
| | 134 | }}} |
| | 135 | 2. Update the git tree cache |
| | 136 | {{{ |
| | 137 | git read-tree -m -u HEAD |
| | 138 | }}} |
| | 139 | |
| | 140 | 2. Check which files have been excluded |
| | 141 | {{{ |
| | 142 | git ls-files -v | grep ^S |
| | 143 | }}} |