Question

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?

Was it helpful?

Solution

If your second feature is not related to the first, why is it built on top of the commits of your first one? Are you modifying your local master branch directly instead of creating feature branches?

If you're contributing to an open-source project, you'll probably want to make feature branches off of the local master instead of modifying it directly. Then you can use your feature branches to send pull requests against the upstream master. If your feature is merged by the maintainer, then you an fetch the newly updated upstream master to update your local one.

In the meantime, if your features really are unrelated, then just keep making branches off of the unmodified version of master, or use upstream/master:

git checkout -b feature upstream/master
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top