Wednesday, April 8, 2015

Working with forked git repo- proper way to sync- part2

After writing my previous blog post, I played around with github UI a bit and found another method to sync forked repository with the original. So decided to write down those steps here.

1. Browse your forked repository. I'm using https://github.com/udarakr/carbon-store/ repository which I have forked from https://github.com/wso2/carbon-store. You can notice the organization difference by looking at the URL.


You can notice that my carbon-store fork is 71 commits behind the original.

Then press the Pull Request link and you will get something similar to the following.



Since my fork is 1 commit ahead, by default github suggests me to create pull request  using this commit. But my intension is different here.

So click head fork drop down and select a different one. Other than the one selected at the moment. So I choose splinter/carbon-store and this is my outcome. (Don't worry about this step,  you can select whatever you want. This is a trick to change base fork to head fork and vice versa)

  
Now click on the base fork and select your forked repository/branch and then change head fork to the original. You will get something similar to the following.


Now press the Create pull request button and open a pull request.




Since I have 71 commits involved in this pull request I have to scroll a bit to find the Merge pull request button.



Press Confirm merge and you are done !!



Now if I browse my forked repository, I can see that I'm no more behind the original repo :)



No comments:

Post a Comment