Outpus git commands to get all branches up to date

Some refactorings.
Still some hardcoded things, but at least auto-select some stuff based
on platform.

Now figures out which merges and in what order they need to be done to
bring all branches up to date.

Outputs a mock script for updating all branches.