Dominic
Dominic

Reputation: 1304

Branch restrictions in git / Revoking copies of a git repo

I'm trying to workout a workflow where changes need to be approved before they can be merged into the master branch.

One obvious solution is reject/approve pull requests. But the problem we have is that we don't want employees maintaining their own repos of the company code. Therefore, we have a company account/repo that everyone pushes to. Is there a way we can give users their own copy of the code under their account, but revoke access once they leave the company, so we can use pull requests effectively?

What are my other options around restricting commits to the branch.

We use bitbucket.

Upvotes: 0

Views: 223

Answers (1)

Eevee
Eevee

Reputation: 48546

Give employees access to the company repo, remove that access when they leave?

Developers aren't children; you can tell them "don't commit to master except via pull request" and reasonably expect them to do it. If you can't, consider finding other developers.

Upvotes: 1

Related Questions