A bunch of simplifications to the git module

Here is a bunch of simplifications to the git module.

It is not expected to change Ansible behavior and passes `make tests`.