How to know if I should fork or make branch to contribute? #163025
-
Select Topic AreaQuestion BodyHi. I am new in GitHub and want to help in other people repo. I try before to clone a repo and make new branch then push my change but it say I have no permission. Then I see some video and they say to fork first but now I get confuse. If I fork, it make my own copy but the main repo get update sometime. How I keep my fork same with original repo? And also when I finish my changes how I send it to the original project? Also if I only want to fix small bug or write better README, do I still need to fork? Or there is other way? Sorry if my question is not so clear. Just want to learn correct step. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
If you don’t have write access to the repo, you have to fork. That’s the normal way to contribute. Forking lets you work on your own copy without needing permission. Then you open a pull request to suggest your changes. Branching is only for when you own the repo or have access. You can’t push branches to someone else's repo unless they added you as a collaborator. Fork = safe, works for everyone. Even for small fixes like typos, just fork, make the change, open a PR — it’s simple and it won’t break anything. |
Beta Was this translation helpful? Give feedback.
If you don’t have write access to the repo, you have to fork. That’s the normal way to contribute.
Forking lets you work on your own copy without needing permission. Then you open a pull request to suggest your changes.
Branching is only for when you own the repo or have access. You can’t push branches to someone else's repo unless they added you as a collaborator.
Fork = safe, works for everyone.
Branch = only if you’re part of the team.
Even for small fixes like typos, just fork, make the change, open a PR — it’s simple and it won’t break anything.