zyas
zyas

Reputation: 151

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

Upvotes: 0

Views: 133

Answers (1)

acanby
acanby

Reputation: 2993

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

Upvotes: 1

Related Questions