I’ve got a problem, where a large commit which changes about a thousand lines of code, removing whitespace from the end of lines and removing spaces before tabs.
There are also about 50 pull requests for this project, in which all will get conflicts, when my commit is merged. Is there any way that git can be set up so that when merging future commits, it ignores conflicts where one of them is just a whitespace change?
Modifying git itself or using a third party tool isn’t possible, but using a hook is fine.
Or (more precise)
should be enough to ignore all space related conflicts during the merge.
See git diff:
ks1322adds in the comments a good advice:The OP Callum Macrae reports that, in that case, the merge proceed uninterrupted, and the trailing spaces contained in the pull request patches are applied to the local files.
However, the OP uses a pre-commit hook which takes care of said trailing spaces.
(I suppose a bit similar to this one, also referenced here).
The OP’s pre-commit hook is referenced here: