Skip to content

How can I commit automatically ? #47

@Supradyn

Description

@Supradyn

Hi!
I need to commit all files in work_dir like "git commit -a". I can't get it from docs.
And in readme.md its like:

$bld = new Git2\TreeBuilder();
$bld->insert(new Git2\TreeEntry(array(
    "name" => "README.txt",
    "oid" => "63542fbea05732b78711479a31557bd1b0aa2116",
    "attributes" => octdec('100644'),
)));
$tree = $bld->write($repo);

How can I get this oid ? It doesnt work like
$repo->hash("file-path")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions