Refactor git

This basically just moves the `Git` class to a higher level in the hierarchy, splits it up to smaller classes, and adds a bit of test coverage.
Seems tertiary operator is a bit heavy handed in my opinion. Can we just do:

```ruby
"-H \"Authorization: token #{data.token}\" " if data.token
```