开发者

Github commits and pull requests

开发者 https://www.devze.com 2023-01-23 10:05 出处:网络
I forked some project and cloned it l开发者_如何转开发ocally. Changed files, commited changes, pushed changes and changes were either implemented or rejected. Then, some time has passed so I fetched/m

I forked some project and cloned it l开发者_如何转开发ocally. 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号