Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github commits and pull requests

Tags:

github

commit

I forked some project and cloned it locally. Changed files, commited changes, pushed changes and changes were either implemented or rejected. Then, some time has passed so I fetched/merged my fork with the project I forked from. Made some changes, commited and pushed. Sent pull request and that's where the problem begins: in pull request there are commits which were implemented or rejected and I don't want to send them to master owner, I just want to send new ones.

Am I doing something wrong? How can I fix this?

like image 307
niksy Avatar asked Oct 14 '22 21:10

niksy


1 Answers

What I do is create a new, clean branch based on upstream, and then cherry-pick the changes I want to submit onto that branch (or develop them on that branch in the first place, or use some other method to copy them over to that branch).

It can look a bit silly to have a list of public branches called "clean1", "clean2" or whatever, but hopefully you won't need to make too many of these.

Alternatively, you could just submit patches instead of pull requests.

like image 95
Robin Green Avatar answered Oct 23 '22 14:10

Robin Green