When we’re on boarding new programmers we always institute a code review process where at least one programmer experienced with the project reviews the work of the new programmer. We use GitHub’s Pull Request feature to help us do this. Most of the changes are easy for us to review and then approve or tell the programmer they need to make changes. Every so often we run into a file where GitHub lets us down (really I don’t know what else they would do here :-)):

merge with 8k+ changes

The issue was that this particular file had it’s line endings changes on the master branch but not the pull request branch it was messing up the whole system. To try and make sense of all the changes we had to resort to using the command line:

git diff "pr/#" master -w -- file\path\here > temp.txt

This command is calculating the differences in the file (“file\path\here”) between the pull request branch (“pr/#”) and the master branch but it’s ignore all whitespace when comparing the two (“-w”).

This produced a much shorter (20 lines) list of changes which we then had to manually merge in but at least the programmer didn’t loose all their work.