-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Moving to a feature-branch style of development #51
Comments
Can you say more about what you mean by using centralized feature branches? Would that require the maintainers to create a feature branch whenever there is a new feature that needs to be worked on? In the case of "checking out" a PR from a fork (e.g. checking out https://github.com/billglover/django-concept), the way to do it is: 1/ References: ^ That second link explains steps 3 and 4 more clearly:
|
Does feature-branching come with any overhead in terms of complexity for new contributors? |
Feature branch flow is basically like saying "don't work in the master branch" and "keep your work focused on one feature". So, it can actually help new contributors to avoid problems like losing focus or having an out-of-sync master. Working in a feature branch is basically the same as if they were to work in a fork of the project, which might be advisable for new contributors in any case. |
For what it's worth, we have used Git Flow in a couple of projects, mainly to encourage the use of feature branches. There is a nice visual guide and helper script for Git Flow: https://danielkummer.github.io/git-flow-cheatsheet/ |
Thank you Brylie! Gitflow is exactly what I'm thinking of. I think it makes
more sense to have an upstream branch for any fork that intends to provide
PRs to the upstream. This would make it easier for other people to get
involved because it would all be in the context of the Django CodeBuddies
project. If we're constantly pushing to other people's forks to get a
change into this code base, it could become a fairly messy affair to
untangle down the road, when this is multiplied by a dozen or so forks that
contain multiple upstream PRs, for example.
…On Tue, Jan 28, 2020, 2:13 AM Brylie Christopher Oxley < ***@***.***> wrote:
For what it's worth, we have used Git Flow in a couple of projects, mainly
to encourage the use of feature branches. There is a nice visual guide and
helper script for Git Flow:
https://danielkummer.github.io/git-flow-cheatsheet/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQU4TTVQGDOLLULOSCNQFLQ77LKFANCNFSM4KJMUQOQ>
.
|
Consistent feedback I've had from development teams has been along the lines of "GitFlow is too complicated". A I'm not a professional developer myself so have never dug deeper. I'm interested in:
|
GitFlow is just providing a consistent way of doing things using common concepts. There are three main moving parts, which can be adopted à la carte:
Features are just branches, which is already a common workflow. When you start working on a feature, you create a feature branch (from the Once the Hotfixes are branches that are opened against the |
The above questions could be asked about Git itself. GitFlow is just a conventional Git workflow (hence the name). From what I can tell, GitFlow doesn't add too much ceremony or complexity compared to how many developers are already using Git. |
Hmm.. I feel like two different Git workflows are being conflated here. My understanding of the Git Feature Branch Workflow is more like this description from Atlassian: Gitflow is described here: There's also Forking Workflow: This post has some nice visuals of different Git workflows: |
Sure. The original request for using feature branches seems like a good suggestion. It is also worth noting, as is done in the Atlassian article, that Feature Branches and GitFlow are somewhat related. |
I'm still trying to understand the article on GitFlow. Will have another read first thing tomorrow and see if I can work through how it might work. There are some sections of the Forking Workflow that stand out from the Atlassian tutorial:
I get the feeling that these workflows all typically co-exist, the first distinction that we would want to make is: do we only accept contributions from members of the code buddies org, or do we accept contributions from those who aren't members, but have forked the project? The second distinction appears to be, what branching patterns we want to adopt for contributions that occur within the organisation. |
Here is a proposal, so we might be able to close this issue with some agreement:
|
" Here is a proposal, so we might be able to close this issue with some
agreement:
1. use feature branches for developers working within this repository
(as is the current approach)
2. allow users to choose their preferred branching style in
*forked* repository
pull requests
3. use Git tags for releases (default behavior for GitHub)"
#2 makes me a little nervous, especially if there's multiple people that
might be coming in to comment--particularly core contributors. That spreads
out the project in a way that feels like it would complicate management.
How would we manage this?
…On Wed, Jan 29, 2020 at 7:06 AM Brylie Christopher Oxley < ***@***.***> wrote:
Here is a proposal, so we might be able to close this issue with some
agreement:
1. use feature branches for developers working within this repository
(as is the current approach)
2. allow users to choose their preferred branching style in *forked*
repository pull requests
3. use Git tags for releases (default behavior for GitHub)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQU4TVMZPQ4XBPSIPUOS73RAFWK5ANCNFSM4KJMUQOQ>
.
|
Idea number two was basically to acknowledge that people might fork the repository and experiment with the code. At some point, they might want to contribute code from their fork. GitHub is designed to allow this type of workflow and leaves it up to project maintainers whether or not they will accept the pull requests. |
Catching up on this thread. :)
@bengineerdavis I understand what you're saying now! My counterpoint to this is I think Bill's docker PR was a bit of a special one where it was tempting to try to create PRs against his fork (to help with the work) because it was a major block of work. In general, though, PRs from shouldn't be so huge that they would necessitate new PRs on those forks. For the past few months, I've been learning that the smaller the PR the better, because smaller PRs are easier to review -- but of course I haven't been very good at doing that in this project (yet). Re: Gitflow I took a look at https://danielkummer.github.io/git-flow-cheatsheet/ and I get the idea, but I do think it is more overhead than we want to introduce to new contributors, some of whom may be trying to get the hang of git itself first.
I like this! My only caveat to #2 is that I don't think we should admonish non-core contributors who for some reason or other forget to create a branch in their fork, but we should generally encourage creating branches as a good practice in our contributor documentation. I'm imagining our contributor documentation saying something like:
4/ On github.com/codebuddies/codebuddies, all new PRs were merged into staging, and a release happened whenever the (What do you all think of the flow above? Am I missing anything? Do folks prefer having an explicit |
On the whole I agree with the proposal by @lpatmo. Do we have an opportunity to simplify further by removing the need to distinguish between a hotfix and a feature. Maintaining the distinction implies we have two separate approaches for the fix, test, or deployment of hotfixes and features. I'm not sure we need this distinction. |
I don't have a strong opinion either way, so decided to put this up in a Slack vote at https://codebuddies.slack.com/archives/C04BRN86J/p1580439065055600 so folks can vote if they have an opinion on either approach. :) |
The poll on Slack has been open for a couple of weeks and is a dead heat. The conversation under the poll tended towards concluding that There are still a number of open questions regarding the benefit of this proposed change and how it might be implemented, so would recommend we address these if we want re-open the proposal. Items raised in the Slack discussion include:
|
There doesn't need to be much formality at this point. We can just help new developers remember to create a branch when starting work, regardless of how they name it. Even if a developer accidentally commits to the master branch in their local fork, they can still create a branch and open a pull request from that branch. |
I'm running across an issue contributing to Bill's contributing to this project (his fork: https://github.com/billglover/django-concept). This to help complete issue #44 .
I've attempted to fork his fork, but realize that GitHub considers it part of the same repository (I think), and so even after renaming my current fork of the official CB repo, GitHub still won't let me fork Bill's fork of this repo (sorry for all the spamming of fork and repo!).
This made me realize that using a feature branch for things like our development setup and then sub-branches for
docker-compose
setups would make group contributions easier.The text was updated successfully, but these errors were encountered: