Question

Can I make users of an open source project, clone the project, branch off to a feature branch, make their changes, test by rebasing their code on top of the current working branch and then push, for a pull request, their feature branch so I can rebase their changes into my work? (not sure if thats how most open source communities actually work ... )

So it would look like this:

Project On Github
     |
Clone Project
     |
git checkout branch x.x
git checkout -b new_feature
... Add some code/fix some issues .. TDD is a must
git commit // Commit your stuff.
git checkout branch x.x
git rebase new_feature
.. Rebaseing ...
.. Test to make sure it works // unit tests :D ..
git checkout branch new_feature
     |
submit this branch, new_feature, as a pull request
     |
I see new branch, I review, I rebase or reject.

Is this a typical kind of workflow? or how do most open source communities handle this, realizing that question is ambiguous and can result in this being closed, how would you handle this situation assuming it was your open source project? is this a "standard" way of doing it?

Was it helpful?

Solution

To answer the first part of your question: Yes.

Can they clone? Yes, they can clone any public repository.
Can they create branch? Yes, they can branch any cloned repository.
Can make changes? Yes, they can branch any cloned repository.
Can do tests by rebasing on top of the current working branch? Yes, developers using git usually checkout the branches they are interested in editing before they start to work, and then generate commits on top of that, no need to rebase (yet).
Can they send pull requests? GitHub lets them create pull requests.

Then, you can either merge the pull request or reject/delete the pull request.

As GitHub documentation describes, Approvers (devs with write permissions on the main repository) can either merge the pull request from the web, or checkout the pull request and work on it (modify it, rebase it, whatever you like) and then push the accepted changes.

To answer your second part: IMO this is a good way to receive code contributions from other professionals on the internet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top