When building Emscripten from source you should use the same branch (incoming, or master) for building all three repositories. The topic Branches explains how to ensure that the versions are kept in sync.

Do not include merge commits in pull requests; include only commits with the new relevant code.

Run all the automatic tests and make sure they pass. Some tests might not be required for very simple patches (for example, when just adding tests for new library functions). If you don’t have time to run all the tests, at least run a random subset of them (say, 100), see that link.

“Add an automatic test to tests/runner.py if you add any new functionality or fix a bug.

emscripten.py then receives the core compiler output, modifies it slightly (some regexps) and then adds some necessary code around it. This generates the basic emitted JavaScript, which is called emcc-2-original in the intermediate files saved in debug mode.