On 01/12/2015 10:12 AM, Jens Søgaard wrote: > The API documents a "create branch" method that takes 3 params: > project_id, branch_name and ref - however I can not figure out what to > do with ref? > http://doc.gitlab.com/ce/api/branches.html > > I can not figure out what to provide as "ref" - no matter what I do > (tried empty string) I get: > > /ErrorException' with message 'Invalid reference name'/ > * > * > *Any ideas as to how I can provide ref? Or am I missing something in the > way I go about things?* > * > * > My goal is to create a repository from the API and add some files to it. > But since the project does not by default have a branch I want to create > it before adding files. > >
As the documentation suggests: ref (required) - Create branch from commit SHA or existing branch So, you have to provide either a commit SHA or a branch name from which the new branch will be created. -- GPG : 0x3A7DDABC985EDC6E Blog: http://axilleas.me -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/54B38E01.8030109%40gmail.com. For more options, visit https://groups.google.com/d/optout.