launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04397
Off-topic, interesting: git-flow
Hi everyone,
I came across the git-flow tool and "A successful Git branching model" on Hacker
News, and it struck me that some of us discovered and use this same branching
model with bzr and the 'switch' command[1][2]. We just haven't told everyone
about it :)
Here is the bzr switched branch model:
$ bzr branch lp:theproject devel
$ bzr checkout --lightweight devel dev
$ cd dev
$ bzr switch -b ../the-fix
... hack ...
The interesting bit about git-flow is the tooling support it provides for the
switched branch model[3]. It makes for less typing while also cleaning up your
repository tree:
$ git flow init
# start a feature branch in features/the-feature
$ git flow feature start the-feature
... hack ...
# merge features/the-feature back into devel
$ git flow feature finish the-feature
$ git flow hotfix ... # start a hotfix branch in hotfixes/
$ git flow release ... # start a release branch releases/
It looks really interesting for developing smaller tools and libraries, like the
ecosystem that has developed around the Launchpad project. It could be made
into a bzr plugin, but we would have to make sure the model supports code reviews ;)
Something like this:
$ bzr init-flow
$ cd dev
$ bzr feature start the-feature
... hack ...
$ bzr send
$ bzr feature finish
For more, see the links:
[1]
http://doc.bazaar.canonical.com/latest/en/user-guide/organizing_your_workspace.html#local-sandbox
[2] http://nvie.com/git-model
[3] http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
--
Māris Fogels -- https://launchpad.net/~mars
Launchpad.net -- cross-project collaboration and hosting
Follow ups