Add a GitResetLast command

This way we can revert the last committed change.
This commit is contained in:
Vishesh Handa
2019-02-15 19:27:40 +01:00
parent 0a4c20f12f
commit 1f7871fe12
4 changed files with 85 additions and 0 deletions

View File

@ -150,6 +150,19 @@ Future gitPush(String folderName) async {
}
}
Future gitResetLast(String folderName) async {
print("Going to git reset last");
try {
await _platform.invokeMethod('gitResetLast', {
'folderName': folderName,
});
print("Done");
} on PlatformException catch (e) {
print("gitResetLast Failed: '${e.message}'.");
throw createGitException(e.message);
}
}
Future gitCommit({
@required String gitFolder,
@required String authorName,