addRemote method
Implementation
Future<GitRemoteConfig> addRemote(String name, String url) async {
var existingRemote = config.remotes.firstWhereOrNull(
(r) => r.name == name,
);
if (existingRemote != null) {
throw Exception('fatal: remote "$name" already exists.');
}
var remote = GitRemoteConfig.create(name: name, url: url);
config.remotes.add(remote);
await saveConfig();
return remote;
}