Skip to main content

git_assistant 0.3.2-beta copy "git_assistant: ^0.3.2-beta" to clipboard
git_assistant: ^0.3.2-beta copied to clipboard

Assists you to use git and .git in easy and simple way with robust API

Git Assistant

Assists you to use git and .git in easy and simple way with robust API

BSD-3-Clause License Dart Version Dart Platform Support Under Development Coverage Status Workflow status pub


Features #

Implemented

  • Command generator and executor

    • Generates command sequence
    var git = Git();
    print(git.log.prettyOpt(PF.oneline)); // 'git log --pretty=oneline'
    print(git.log); // 'git log'
    
    • Executes command sequence
    var git = Git();
    // Executes 'git log --pretty=tformat:commit hash = %H' and returns stdout
    git.log.prettyOpt('commit hash = ${PP.commitHash}').exec();
    git.log.exec(); // Executes 'git log'
    
  • Git commands support

    • Log - command

      • Pretty - option
      // you can use pretty option with two formatting choices:
      // 1. Basic formatter in PF enum such email, oneline and etc.
      // 2. Custom formatter which use tformat and placeholders in PP.
      var git = Git();
      git.log.prettyOpt(PF.oneline).exec(); // 'git log --pretty=oneline'
      // 'git log --pretty=tformat:commit %H'
      print(git.log.prettyOpt('commit ${PP.commitHash}'));
      
    • Push - command

      • Options
      var git = Git();
      git.push.allOpt().exec(); // Runs 'git push --all'
      // Runs 'git push --force --all --dry-run'
      git.push.forceOpt().allOpt().dryRunOpt().exec();
      // Runs 'git push --set-upstream origin master'
      git.push.setUpstreamOpt(remote: 'origin', refspec: 'master').exec();
      
      • to - method
      var git = Git();
      // Runs 'git push origin master'
      git.push.to(remote: 'origin', refspec: 'master').exec();
      // Runs 'git push --dry-run origin master'
      git.push.dryRunOpt().to(remote: 'origin', refspec: 'master').exec();
      

You can see feature implementation todo in repository projects

License #

Distributed under the BSD-3-Clause License. See LICENSE for more information.

1
likes
160
points
12
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Assists you to use git and .git in easy and simple way with robust API

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

meta, path

More

Packages that depend on git_assistant