Home Ask Login Register

Developers Planet

Your answer is one click away!

Azib.H February 2016

Rebasing and Pull request

I am working on open source plugin and I have made all the changes which were necessary. Currently, I am in master branch of my version of work. I want to rebase updates from the original work and then send a pull request. Could anyone please help what steps do I need to take for rebasing and then for pull request? Thanks


acanby February 2016

You can do a simple rebase as follows:

git fetch upstream # or whatever your remote is
git rebase upstream/master

This might introduce conflicts you need to fix before pushing obviously.

You can now submit your pull request. I'd suggest doing it from a named branch rather than master. You can do this when pushing to Github (or any remote) as follows:

git push origin master:my_awesome_feature

And it will create a branch on the remote named my_awesome_feature

If you want to squash your commits (interactive rebase), you'll still need to do the above steps, but then look here: Squash my last X commits together using Git

Post Status

Asked in February 2016
Viewed 1,945 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life