Loomio

Define a clear git branching model

JR Jason Robinson Public Seen by 45
JR

Jason Robinson Sat 15 Sep 2012 8:06PM

OK cool that this passed, I think with the (hopefully) new semantic versioning will offer much clearer base for not just developers to work on but also podmins on what code to use.

I might have some time tomorrow to write something on the wiki, I guess we can iron out the minor details there (or discuss here and update wiki). If someone else wants to do it of course feel free (note here would be appreciated of course so we don't both do it).

JH

Jonne Haß Sat 15 Sep 2012 8:57PM

I would just update our existing git workflow to point at the git flow extension, the branching model blog post, file pull requests against the develop branch, update the changelog and remind to use the right branch naming convention. I think we can work out a release workflow once we have to or once we gathered some experience what steps work best.

I'm yet not sure if we should configure the repos default branch to master or to develop, what do others think?

Now who wants the honour to run git flow init? :D

JH

Jonne Haß Sat 15 Sep 2012 9:05PM

Oh and one more thing we have to decide (kinda in between this discussion and the versioning one, I'll keep it here because git flow wants to now it): Should we prefix our version git tags with the common v or not?

JR

Jason Robinson Sun 16 Sep 2012 10:27AM

I am updating the wiki now, will hopefully have the page updated in an hour or so.

Btw, the model does change the "do not merge, rebase" rule so I am going to remove that. In my opinion merge --no-ff makes total sense. I've always wondered why it isn't default behaviour.

As for the version prefix, personally I'd say no, but it's really just eye candy :)

JH

Jonne Haß Sun 16 Sep 2012 10:51AM

The merge do not rebase rule is about not merging master or develop into a branch, not vice versa. And I think it still makes sense, Merge branch develop into develop are still meaningless inside the develop branch.

JR

Jason Robinson Sun 16 Sep 2012 10:56AM

OK maybe I didn't get the whole thing, anyway let's iron the instructions out :)

JR

Jason Robinson Sun 16 Sep 2012 11:52AM

OK I updated the short version and the intro - please guys can you give comments on whether it is on the right track and whether it is clear for anyone with basic knowledge of git?

I can update the longer version to match once we have agreed on the basic principles.

Oh and someone with rights to the diaspora github should probably init the git-flow branches (git flow init).

JH

Jonne Haß Sun 16 Sep 2012 1:48PM

That blog post nails it ;)

Looks quite good already.

New naming convention would be feature/issuenumber-description or git flow feature start issuenumber-description, where issuenumber is optional if there's no issue.

The git flow feature finish is actually done by merging the pull request and not by the contributor.

I'd phrase it "issue a pull request to the develop branch", not for.

JR

Jason Robinson Sun 16 Sep 2012 4:51PM

So Jonne you think it's better that instead of doing "git flow feature finish" the contributor does "git flow feature publish" and then does a pull request for the branch?

Works for me if no one has objections let's do that then.

JH

Jonne Haß Sun 16 Sep 2012 6:42PM

That's out of question actually, letting him merge to his develop branch and PR from there makes it impossible to do more than one concurrent PR per repo. And you''ve got fun if your PR is rejected.

JR

Jason Robinson Sun 16 Sep 2012 6:59PM

Ok updated and will progress to update the long instructions section then

JR

Jason Robinson Sun 16 Sep 2012 7:36PM

Page updated.

Btw, how does this model affect testing and Travis etc? Now that development head is on develop branch and master is only for releases.

JH

Jonne Haß Sun 16 Sep 2012 8:30PM

We should build both, develop and master and maybe add both batches to the readme IMO.

ST

Sean Tilley Sun 16 Sep 2012 9:30PM

It'd probably be useful to hit up the Dev list and the stream about changes that we've tweaked how we do branching, just so that everyone's on the same page.

If you want, I can make an announcement through DiasporaHQ also. :)

JH

Jonne Haß Sun 16 Sep 2012 10:56PM

Okay, Sean announcement time! :D

Can you please also switch the default branch of the repo to develop over at Github? Thanks!

ST

Sean Tilley Mon 17 Sep 2012 12:17AM

I'll get right on it. :)

ST

Sean Tilley Mon 17 Sep 2012 2:15AM

DiasporaHQ and GitHub have been updated. I'll hit up the Dev list, too. :)

SH

Steven Hancock Mon 17 Sep 2012 3:23AM

@Jason excellent work on the wiki page, I think the picture (while it might be a little complicated) does a good job of helping explain the workflow to anyone who isn't already familiar with git flow.

JR

Jason Robinson Mon 17 Sep 2012 6:36AM

Just a thought - if develop branch is the default for the repository and someone checks it out via "git clone git://github.com/diaspora/diaspora.git", the default active branch will be develop instead of master.

Do we really need to set up develop as the default repo (even if it is development head, it doesn't imho have to be default)? At least if we do then we need to update install instructions as well so that pod installers use master, not develop.

ST

Sean Tilley Mon 17 Sep 2012 7:36AM

Good thinking. We should make the instructions clear to use the master branch to deploy from. I think Hans is working on an install script of sorts for Ubuntu packaging, that might need to be updated to use master branch as well.

JH

Jonne Haß Mon 17 Sep 2012 9:21AM

I'm kinda in between about the the default branch too. The pros are that PRs go by default against it and an IMO nicer looking (more activity) start page if you drop to our repo the first time. Also if you start browsing the code as interested contributor you'll less likely duplicate work. That git clone one is a big downside though. Since we don't need to update anyone about it (initial default upstreams keep that way), lets try out how often we run into this, support wise, I'd say.

T

tortoise Wed 19 Sep 2012 4:37AM

FYI:
Rackspace sued for hosting GitHub

Um...this is why I suggested to house the code elsewhere as a backup measure...

JH

Jonne Haß Wed 19 Sep 2012 8:29AM

From a quick look at the patent titles they patented what git does, not what github does. So don't know where we would be safer. But let us stop about that in this discussion as it's completely OT ;)