Last active
February 24, 2018 04:08
-
-
Save seLain/a29a921ad76ad36a87d827f10df35dbe to your computer and use it in GitHub Desktop.
fork sibling repo as a branch and send pull request through github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say you have ... | |
- upstream : https://github.com/xxxxx/project_a.git | |
- origin : https://github.com/yourself/fork_project_a.git | |
and there is a sibling project : https://github.com/community_contributor/fork_project_a.git | |
1. get into your git bash under fork_project_a | |
2. add sibling project as new remote: | |
git remote add community_contributor https://github.com/community_contributor/fork_project_a.git | |
3. git fetch (to update and also make sure new remote added) | |
3.1 it will be better to disable the push to this new remote, avoid mistaken push. ref: http://sushihangover.github.io/git-set-up-a-fetch-only-remote/ | |
4. git checkout -b NEW_BRANCH_NAME community_contributor/master (this branch created in local computer, change the "master" if your have specific branch to fork from) | |
5. make changes in NEW_BRANCH_NAME folder, and do necessary tests | |
6. git push origin NEW_BRANCH_NAME (this step pushes NEW_BRANCH_NAME to your github web repo, as a new branch) | |
7. go to github web, review the new branch and make pull request to community_contributor's repo | |
The step 6 can also be done before step 5, which means to create NEW_BRANCH_NAME to your github web repo first. it doesn't matter. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment