@@ -158,7 +158,7 @@ Update a project submodule::
158158
159159 items = project.update_submodule(
160160 submodule="foo/bar",
161- branch="master ",
161+ branch="main ",
162162 commit_sha="4c3674f66071e30b3311dac9b9ccc90502a72664",
163163 commit_message="Message", # optional
164164 )
@@ -199,7 +199,7 @@ Get a snapshot of the repository::
199199
200200Compare two branches, tags or commits::
201201
202- result = project.repository_compare('master ', 'branch1')
202+ result = project.repository_compare('main ', 'branch1')
203203
204204 # get the commits
205205 for commit in result['commits']:
@@ -340,7 +340,7 @@ Examples
340340
341341Get a file::
342342
343- f = project.files.get(file_path='README.rst', ref='master ')
343+ f = project.files.get(file_path='README.rst', ref='main ')
344344
345345 # get the base64 encoded content
346346 print(f.content)
@@ -350,15 +350,15 @@ Get a file::
350350
351351Get a raw file::
352352
353- raw_content = project.files.raw(file_path='README.rst', ref='master ')
353+ raw_content = project.files.raw(file_path='README.rst', ref='main ')
354354 print(raw_content)
355355 with open('/tmp/raw-download.txt', 'wb') as f:
356- project.files.raw(file_path='README.rst', ref='master ', streamed=True, action=f.write)
356+ project.files.raw(file_path='README.rst', ref='main ', streamed=True, action=f.write)
357357
358358Create a new file::
359359
360360 f = project.files.create({'file_path': 'testfile.txt',
361- 'branch': 'master ',
361+ 'branch': 'main ',
362362 'content': file_content,
363363 'author_email': 'test@example.com',
364364 'author_name': 'yourname',
@@ -369,23 +369,23 @@ Update a file. The entire content must be uploaded, as plain text or as base64
369369encoded text::
370370
371371 f.content = 'new content'
372- f.save(branch='master ', commit_message='Update testfile')
372+ f.save(branch='main ', commit_message='Update testfile')
373373
374374 # or for binary data
375375 # Note: decode() is required with python 3 for data serialization. You can omit
376376 # it with python 2
377377 f.content = base64.b64encode(open('image.png').read()).decode()
378- f.save(branch='master ', commit_message='Update testfile', encoding='base64')
378+ f.save(branch='main ', commit_message='Update testfile', encoding='base64')
379379
380380Delete a file::
381381
382- f.delete(commit_message='Delete testfile', branch='master ')
382+ f.delete(commit_message='Delete testfile', branch='main ')
383383 # or
384- project.files.delete(file_path='testfile.txt', commit_message='Delete testfile', branch='master ')
384+ project.files.delete(file_path='testfile.txt', commit_message='Delete testfile', branch='main ')
385385
386386Get file blame::
387387
388- b = project.files.blame(file_path='README.rst', ref='master ')
388+ b = project.files.blame(file_path='README.rst', ref='main ')
389389
390390Project tags
391391============
@@ -414,7 +414,7 @@ Get a tag::
414414
415415Create a tag::
416416
417- tag = project.tags.create({'tag_name': '1.0', 'ref': 'master '})
417+ tag = project.tags.create({'tag_name': '1.0', 'ref': 'main '})
418418
419419Delete a tag::
420420
@@ -702,7 +702,7 @@ Get project push rules (returns None is there are no push rules)::
702702
703703Edit project push rules::
704704
705- pr.branch_name_regex = '^(master |develop|support-\d+|release-\d+\..+|hotfix-.+|feature-.+)$'
705+ pr.branch_name_regex = '^(main |develop|support-\d+|release-\d+\..+|hotfix-.+|feature-.+)$'
706706 pr.save()
707707
708708Delete project push rules::