summaryrefslogtreecommitdiff
path: root/doc/api/branches.md
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-01 10:44:58 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-01 10:44:58 +0300
commitd7afdab7a5fcb1aa686955f6d13e024737e89a94 (patch)
treea2d7a9b5f785f5819870ee8e6cf52156bced7173 /doc/api/branches.md
parent33a00ceeeacfc52272d25cef914a027b9bf13a2a (diff)
downloadgitlab-ce-d7afdab7a5fcb1aa686955f6d13e024737e89a94.tar.gz
Add docs for create branch via api
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'doc/api/branches.md')
-rw-r--r--doc/api/branches.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/api/branches.md b/doc/api/branches.md
index a62f9e38a90..3417a695077 100644
--- a/doc/api/branches.md
+++ b/doc/api/branches.md
@@ -165,3 +165,34 @@ Parameters:
"protected": false
}
```
+
+## Create repository branch
+
+
+```
+POST /projects/:id/repository/branches
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `branch_name` (required) - The name of the branch
++ `ref` (required) - Create branch from commit sha or existing branch
+
+```json
+{
+ "name": "my-new-branch",
+ "commit": {
+ "id": "8848c0e90327a0b70f1865b843fb2fbfb9345e57",
+ "message": "Merge pull request #54 from brightbox/use_fog_brightbox_module\n\nUpdate to use fog-brightbox module",
+ "parent_ids": ["fff449e0bf453576f16c91d6544f00a2664009d8", "f93a93626fec20fd659f4ed3ab2e64019b6169ae"],
+ "authored_date": "2014-02-20T19:54:55+02:00",
+ "author_name": "john smith",
+ "author_email": "john@example.com",
+ "committed_date": "2014-02-20T19:54:55+02:00",
+ "committer_name": "john smith",
+ "committer_email": "john@example.com"
+ },
+ "protected": false
+}
+```