2

Well, I'm trying to contribute to an open source project.. I forked the project on github, then I worked on a feature, finished it and pushed.. It's been sitting on the pull request since the maintainer has been away for a week..

So I had to fork my own master to work on the second request, but now I can't create a pull request because this feature (even though it's not related) is built on the commits of my first one..

So how do you guys keep working on the fork of a project without having your pull requests approved?

4

1 回答 1

2

如果您的第二个功能与第一个无关,为什么它建立在您的第一个提交之上?您是master直接修改本地分支而不是创建功能分支吗?

如果您正在为开源项目做出贡献,您可能希望从本地创建功能分支,master而不是直接修改它。然后,您可以使用您的功能分支向上游发送拉取请求master。如果您的功能被维护者合并,那么您将获取新更新的上游master以更新您的本地功能。

同时,如果您的功能确实不相关,那么只需继续从未修改的版本中创建分支master,或者使用upstream/master

git checkout -b feature upstream/master
于 2013-09-03T02:56:48.860 回答