Fix synchronization between local and remote branches

...so that local branches always track remote branches, create remote branches when necessary, hard reset each time, and only push the branches that they have ensured are correct (not others that may be in a bad state)