Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Difference between github flow and feature-branch flow #10

Open
ziaziosk opened this issue Nov 17, 2014 · 5 comments
Open

Question: Difference between github flow and feature-branch flow #10

ziaziosk opened this issue Nov 17, 2014 · 5 comments

Comments

@ziaziosk
Copy link
Contributor

What is the differences between the feature-branch flow (make a new branch for every feature and then push) and the github flow?

@petros
Copy link
Member

petros commented Nov 18, 2014

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?

@damphyr
Copy link
Member

damphyr commented Nov 19, 2014

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.

@ziaziosk
Copy link
Contributor Author

I think is clear now! Thank you for the participation!

@xarisd
Copy link
Member

xarisd commented Nov 20, 2014

@petros & @damphyr 👍 for the very good explanation.

@petros
Copy link
Member

petros commented Nov 20, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants