Adds support for project-based git integration, branch support, commit, revert and updates Fixes https://gitlab.com/kicad/code/kicad/issues/10441
Includes a tiny class for scoped set-reset of a variable, which is used here to store the current drawing mode. Fixes: lp:1218629 * https://bugs.launchpad.net/kicad/+bug/1518629