DEV Community


Discussion on: How to use git efficiently

adityasridhar profile image
Aditya Sridhar Author

Thanks for mentioning them :)

You have pretty much covered the pros and cons. Here Will list out some more as well

Pros of forking:

The dev's do not need to worry much about breaking the code by mistake Since they wont have access to the original repo


as you mentioned, it can be more time consuming to update local code

But I did come across branch level permissions as well. So one thing which can be done is only the tech lead and some senior devs have write access to the master and the release branch.

All the other developers will have complete access to feature branches, but a read only access to master and release branch. This will ensure the code in master branch and release branch are reviewed and tested code

What do you think about branch level permissions instead of forking in enterprise projects?

Open source I guess forking is the way to go, Since there will be an explosion of branches if every single open source developer gets their own branch in the original repo :D

Thread Thread
agevaled profile image
Pablo de la Vega

Agreed with you, I'm currently thinking on what is the best approach using fork or branch access on upstream.

As you say OS project is the way to go, but I'm thinking if we will use fork or branch, due the ore junior devs have a lot of issues when they need to update the code :/


Thread Thread
adityasridhar profile image
Aditya Sridhar Author

Either one should be fine :)

Use the method the team is more comfortable with :)