Report errors which happened during git operations (issue #306)
Commit pending changes before switching branches

In case user is about to switch branches, we should first commit pending
commits to original one.

Fixed #306