Open ziaziosk opened 9 years ago
The GitHub Flow is more or less the following:
If you have a fork
pull in upstream changes (i.e. sync your fork's master branch from the parent's master branch)
For every feature or fix or experiment
create a topic branch and switch to that
work work work
push to your fork
create a pull request from your fork to the parent
do more work in the topic branch and push, and the pull request will pick it up
when done
clean up by
syncing your fork again,
pushing the synced fork to your remote fork,
and then deleting your topic branches
Done can be, that the pull request was merged, or simply closed (not merged) because it wasn't accepted, or it was an experiment. If the pull request hasn't been merged, you can skip the last syncing process, but you may still want to delete the topic branch if you don't need it for reference or something.
I don't know if this helps or complicates things. I am not sure what the feature-branch flow is. Do you have an article to point me to?
A feature-branch flow says that we make a branch for every feature (AKA topic) work in parallel and then merge it back into our master branch (you can have variants where one or more branches integrate changes before flowing into master but the difference is organizational not semantic).
How and where a feature branch is merged is not specified. So (and this is common when working solo) you do the work in the feature branch, merge into master and push.
The Pull Request Flow goes one step further and decrees that you have to create a pull request and that the only means of merging the changes to master is through the pull request.
Specifically this means that you never perform merges to master in your local repository, you only do this via your version control management server (in this case GitHib).
I don't know if it helps to point out that pull requests are not a feature of git, they are a feature of GitHub. The feature-branch flow can be followed without a server like GitHub, the pull request flow needs the infrastructure.
I think is clear now! Thank you for the participation!
@petros & @damphyr :+1: for the very good explanation.
Just to add that, a feature branch is essentially the same concept as the topic branch. We call it topic branch, because it might not necessarily be a feature. It can be a feature, a bug fix, and experiment, et cetera. Calling it feature branch may limit the idea.
What is the differences between the feature-branch flow (make a new branch for every feature and then push) and the github flow?