Git: Standardize error message handling

Change-Id: I5574abf0acf7ed430f5f7f3b89ebcbddb31f3016
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>