I work for an open-source project and forked it already. Someone has forked it too and has been working with some interesting ideas which won't be pushed to origin soon. I want to help him thus I cloned his fork to my computer. However, I can't push directly my work to his fork. I can't fork him either since I have a fork from origin already. What should I do? Thanks
Suppose your repository looked like this:

#Add the forked repo as another remote to your local repository
git remote add someone https://fork.url #create remote called "someone"
#fetch the changes from that remote
git fetch someone

#rebase the work you want to send onto the fork's work
git branch for-someone my-branch #create branch "for-someone" at "my-branch"
git rebase master for-someone --onto someone/master #take commits from the "for-someone" branch down to your "master" branch and rebase it onto someone's "master" branch

#then push your changes to the other remote
git push someone for-someone #push branch "for-someone" to the "someone" remote
Insert more appropriate remote and branch names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With