Switch branches correctly on update.
Run code or command after update.
Make pre-up, post-up, pre-down and post-down work