Branch VS Fork #22846
-
If I work with a team on a project on GitHub. And I want to make edits to the project. Should I make a new branch for the edition or make a new fork ? Please note that the team has right access on the repository so any member have to option to branch/fork.
So should we use branches or forks for editing the project ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There’s no right or wrong way to do it if it achieves your goals. But, the most common ways people use branches and forks for collaboration is:
So, for example, I am a member of the Atom organization. When I want to suggest a change to anything in the Atom project, I create a branch locally, work on my changes, then push the branch to the GitHub-hosted repo, and open a pull request. However, I am not a member of the Kubernetes organization. If I wanted to suggest a change to something in the Kubernetes project, I would create a fork. But still I would create a branch locally in that fork, work on my changes, then push the branch to the GitHub-hosted repo, and open a pull request. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you @lee-dohm. This is a beautiful explanation. Elegant yet simple. |
Beta Was this translation helpful? Give feedback.
There’s no right or wrong way to do it if it achieves your goals. But, the most common ways people use branches and forks for collaboration is:
So, for example, I am a member of the Atom organization. When I want to suggest a change to anything in the Atom project, I create a branch locally, work on my changes, then push the branch to the GitHub-hosted repo, and open a pull request. However, I am not a member of the Kubernetes organization. If I wanted to suggest a change to something in the Kubern…