How to contribute to someone else's repository?

前端 未结 5 1506
小蘑菇
小蘑菇 2021-01-18 22:48

I have a friend who has a repository in his GitHub account. I want to contribute (pull/push) to the master branch (the only branch) on that repo directly.

How would

5条回答
  •  一整个雨季
    2021-01-18 23:40

    The above answers are missing details.

    Github's docs directly answer this question and clearly say the original repo should be added as another remote so the PR can be pushed, i.e.

    git remote add upstream 
    

    Your own fork on Github can now be pushed to as "origin" (or whatever you labelled it), but the original repo can be pushed to as "upstream" (or whatever label to differentiate it from your fork).

提交回复
热议问题