Exclude generated files from diffs and from merge conflicts
Two generated files are go.sum
and package-lock.json
. There is little value in diffing these files, solving conflicts in them, or inspecting them at all. We could exclude them from diff and, on merge conflict, we could check out one side by default so that developers can spend time diffing and solving conflicts on pertinent code. If someone still wants to diff them they could always do git diff --text [...]
.
This can be achieved with one .gitattribute
file containing:
/backend/go.sum -diff merge=ours
/webui/package-lock.json -diff merge=ours
[...]