-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can I create a new branch? #36
Comments
I haven't implemented that API. I'll add it later http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_create_oid also, this documents are useful. |
ok , thans for your reply and php-git is very helpful and usefull. |
now, you can create a branch like this. ```` $repo = new Git2\Repository(".git"); $branch_name = "refs/heads/feature/create_branch"; $oid_or_symbolic_ref = "b4fd0a854ae8a6a02c89ab08e3e2f41bd4832ff1"; $force = false; $ref = Git2\Reference::create($repo, $branch_name, $oid_or_symbolic_ref, $force); ```` this API throws \RuntimeException when failed.
hey @ZhuRong I've added the API. please create a ticket if you found some required API. |
hi, @chobie ,thanks for adding the API so fast and I will try it in near future. |
hi , @chobie , thanks very much for your help first. |
did you mean |
ok and I am waiting for it. |
@ZhuRong sorry, that API still experimental. you should execute |
Did you mean that API is experimental in library named libgit2? |
http://libgit2.github.com/libgit2/#HEAD/group/checkout/git_checkout_tree specifically, there is |
Oh,I'll keep attention with it and maybe I should execute checkout with shell until libgit2 tagged next version. |
Hi , I need to create a new branch like fork on github with php , is there any api can solve it?thx
The text was updated successfully, but these errors were encountered: