I want to pull a specific commit from another person’s branch into my own branch. Both project are forks of the same project which neither of us owns. The person who made the commit has not sent a pull request to me, yet I want his changes in my branch anyway.
I’ll give an example scenario,
- Developer Adam has created a repository
Adam/GameLibon GitHub. - I, Andreas, have made my own fork of this repository, and made some changes on a separate
Andreas/GameLib/devbranch. - Another Developer, Bob, has made his own fork and noticed a bug, making the changes and pushing it as a single commit to his
Bob/GameLib/masterbranch.
Bob has not made a pull request to neither me (Andreas) nor the original creator (Adam). Yet, I still want to pull Bob’s single commit from Bob/GameLib/master into my branch Andreas/GameLib/dev.
How would I go about doing this properly? (i.e., not brute force downloading Bob’s code as a zip and merging his changes into my branch with a text editor)
You add his repo as a remote to your repo
Add a branch for his changes
Now you can fetch Bob’s changes
and see if you can merge it into your own patch_branch
or you cherry pick his changes which you will have to look up elsewhere as this fully depends on what oyu are trying to do.