Give work tree to git commands; chomp command results.
Fix cond condition.
Fixed commit guard condition.
Better grammar.