Skip to content

Can i git clone / commit / push with this? Or is this lib for reading, stat #20

Description

@softmarshmallow

Does this library follows libgit2 or just a simple wrapper for reading git stats, not having actual source on the local device

Activity

  1. phibr0 commented on Nov 2, 2020

    @phibr0

    Same Question here, would need that feature

  2. jenshor commented on May 28, 2022

    @jenshor

    To answer that question:

    the git package has an interface that allows to run any command by using the runCommand method from a GitDir instance.

    Therefore, you could clone, commit, push with this package.

  3. GibreelAbdullah commented on Jun 17, 2022

    @GibreelAbdullah

    GitDir doesn't have a default constructor and the only two static functions exposed are FromExisting() and Init(). How do I clone a new repo?

  4. jenshor commented on Jul 8, 2022

    @jenshor

    @GibreelAbdullah it looks like this is currently not supported. But you could just use the Process class from dart:io:

    final pr = await Process.run('git', args, workingDirectory: processWorkingDir, runInShell: true);

    args would then be something like ['clone', url].

    This is also how the git package runs the commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions