commitToBranch method

Future<void> commitToBranch({
  1. required String contentDirFullPath,
  2. required String branch,
  3. required String commitMsg,
})

Implementation

Future<void> commitToBranch({
  required String contentDirFullPath,
  required String branch,
  required String commitMsg,
}) async {
  final gitDir = await GitDir.fromExisting(
    path.current,
    allowSubdirectory: true,
  );
  await gitDir.updateBranchWithDirectoryContents(
    branch,
    contentDirFullPath,
    commitMsg,
  );
}