# 获取项目指定单个分支

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v4/projects/{项目ID}/repository/branches/{分支名称}:
    get:
      summary: 获取项目指定单个分支
      deprecated: false
      description: ''
      tags:
        - GitLab Api
      parameters:
        - name: 项目ID
          in: path
          description: ''
          required: true
          example: '111'
          schema:
            type: string
        - name: 分支名称
          in: path
          description: ''
          required: true
          example: dev
          schema:
            type: string
        - name: PRIVATE-TOKEN
          in: header
          description: GitLab个人Token
          example: glpat-q1csJCWcYYGum_xZxHhg
          schema:
            type: string
            default: glpat-q1csJCWcYYGum_xZxHhg
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  commit:
                    type: object
                    properties:
                      id:
                        type: string
                      short_id:
                        type: string
                      created_at:
                        type: string
                      parent_ids:
                        type: array
                        items:
                          type: string
                      title:
                        type: string
                      message:
                        type: string
                      author_name:
                        type: string
                      author_email:
                        type: string
                      authored_date:
                        type: string
                      committer_name:
                        type: string
                      committer_email:
                        type: string
                      committed_date:
                        type: string
                      trailers:
                        type: object
                        properties: {}
                      web_url:
                        type: string
                    required:
                      - id
                      - short_id
                      - created_at
                      - parent_ids
                      - title
                      - message
                      - author_name
                      - author_email
                      - authored_date
                      - committer_name
                      - committer_email
                      - committed_date
                      - trailers
                      - web_url
                  merged:
                    type: boolean
                  protected:
                    type: boolean
                  developers_can_push:
                    type: boolean
                  developers_can_merge:
                    type: boolean
                  can_push:
                    type: boolean
                  default:
                    type: boolean
                  web_url:
                    type: string
                required:
                  - name
                  - commit
                  - merged
                  - protected
                  - developers_can_push
                  - developers_can_merge
                  - can_push
                  - default
                  - web_url
              example:
                name: dev
                commit:
                  id: 40f224bce46aa28fb9bca73c4ee7274ad47b3e11
                  short_id: 40f224bc
                  created_at: '2024-11-18T10:17:00.000+08:00'
                  parent_ids:
                    - 1c26606eaa80fcf28554a64df55d4af47907fe6a
                  title: Commit Test
                  message: |
                    Commit Test
                  author_name: zhf
                  author_email: 1055412539@qq.com
                  authored_date: '2024-11-18T10:17:00.000+08:00'
                  committer_name: zhf
                  committer_email: 1055412539@qq.com
                  committed_date: '2024-11-18T10:17:00.000+08:00'
                  trailers: {}
                  web_url: >-
                    https://git.csntcorp.com/mmp/edi/-/commit/40f224bce46aa28fb9bca73c4ee7274ad47b3e11
                merged: false
                protected: false
                developers_can_push: false
                developers_can_merge: false
                can_push: true
                default: true
                web_url: https://git.csntcorp.com/mmp/edi/-/tree/dev
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: GitLab Api
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/5476045/apis/api-234614229-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
