Secured Github branches with GitFlow

I have a repository with protection against my development, and I use the GitFlow branching model. There are two branches; develop (containing components currently under development) and master (last deployed production code).

My development branch prevents the direct creation of commits through secure branches of GitHub. When you locally complete a patch using GitFlow, it automatically merges the patch branch into your local wizard and develops the branches. However, pushing changes directly to the development branch is unacceptable, since this is a protected branch

How can you overcome this? Every time I create a patch, I must:

  • Manually disable branch protection
  • Click development branch
  • Bring him back to

It is not automated and therefore not very acceptable.

+16
source share
1 answer

Are you the owner of the GitHub project and do you have an administrator role setup with your account (or can you give administrator access to your account)?

In this case, I would recommend that you not protect the branch for administrators. Thus, you can guarantee that other people will not insist on development, but all "knowledgeable developers" with administrator access can. However, they must know what they are doing.

You can edit this behavior at https://github.com/${name}/${repo}/settings/branches/ . My settings look like this (the last checkbox is very important):

Github Branch Security Settings Example

Note. Perhaps you can also use the option "Limit who can click on this thread."

0
source

Source: https://habr.com/ru/post/1015565/


All Articles