A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://python-gitlab.readthedocs.org/en/stable/gl_objects/branches.html below:

Branches - python-gitlab v6.2.0

Back to top

Toggle table of contents sidebar

Branches References Examples

Get the list of branches for a repository:

branches = project.branches.list(get_all=True)

Get a single repository branch:

branch = project.branches.get('main')

Create a repository branch:

branch = project.branches.create({'branch': 'feature1',
                                  'ref': 'main'})

Delete a repository branch:

project.branches.delete('feature1')
# or
branch.delete()

Delete the merged branches for a project:

project.delete_merged_branches()

To manage protected branches, see Protected branches.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4