DI command factory to replace bare function calls
To get rid of the config.Config we need to abstract interaction with it.
As it is used in the command
package we are about to introduce an abstraction to create git commands.
This gives us more flexibility in testing as well as in the implementation hidden behind the interface.
It is an initial idea that is why only one function is migrated to be used throw a new abstraction.
Part of: #2699 (closed)