revertLocalChanges function
Reverts all local changes in the directory
Implementation
Future<void> revertLocalChanges(Directory directory) async {
final result = await Process.run('git', [
'restore',
'.',
], workingDirectory: directory.path);
_throw('Could not restore all changes', result);
}