fix switching branches when using git