From what I understand you're wanting to have batch files execute based on git events such as post commit and pre commit?
The .git folder will be created when you initialize a git project. In the folder you'll have a folder called hooks. You will then see several files ending in .sample.
If you rename any of these files to strip the .sample off the end (so, for post-commit.sample you'd end up with post-commit) then git will see that you want to hook that particular event. Inside the file itself you can have your batch file execute by simply providing the path of the batch file.
I have a batch file called test.bat in .git/hooks/ and within post-commit I replaced ": nothing" with ./git/hooks/test.bat
My test.bat file merely contains "echo hurrah". Now whenever I do a commit in that particular project I see hurrah echoed in the console.
From the looks of things it seems that you'd have to set up hooks for every git project you're working with. However, it might be possible to set it up so the .git/hooks folder always has your batch files set up whenever you initialize a new git project.
Check the value of your lighting variable on the other computer. From the code you've posted, only ambient lighting is applied when 'lighting' is equal to 1 (both ambient, and directional are applied when lighting is equal to 2).
I don't see where lighting is actually set anywhere in the code you posted but that's a good starting point to take a look at for you.
To reiterate, the reason it looks brighter on the other machine is probably because you're only applying ambient lighting when it runs on that machine.
Take a look at quadtrees. As your level format is already a 2D grid, this would be ideal for quickly determining the largest possible box you can make out of the smaller boxes. The idea is similar to Waterlimon's.
Starting from the root node, you would drill deeper into the tree until a node has no empty children or you've met a maximum depth. If all 4 children of a node contain data (boxes) then it's safe to represent that as a single block.