zencoder/zenflow — pull request #10 by jondkinney (2013-09-20 03:11:10+00:00)
Title: Add rebase opt to keep feature branches up to date

Summary
=======

- Requires adding a config option for 'merge_strategy' to the .zenflow config file at the root of a project.

merge_strategy: rebase

- [Re]running the zenflow init command will prompt for one

- The global 'rebase' option only applies to the following commands:
- zenflow feature update
- zenflow feature finish

- Optional one time rebase capabilities on update with the `--rebase` flag.

zenflow feature update --rebase

Details
=====

zenflow feature update
--------------------------------

Start by pulling the latest changes from the source (parent) branch with `git pull` using the ` --rebase` flag so that a merge commit won't result if new changes need to be pulled in.

Secondly, zenflow will rebase the current feature branch to master (or whatever is specified as the source branch) and put all the new changes on top of it. This command can be run multiple times to continuously ensure a long lived feature will be compatible with the latest master when it comes time to finish the feature and merge it back.

zenflow feature update --rebase
---------------------------------------------

If you prefer to typically merge everywhere thus have your merge_strategy set to 'merge', but find a situation where you'd rather run the `zenflow feature update` command and do it using rebase... you can optionally pass the `--rebase` flag to that command manually and only that update command will be run in a rebase style.

zenflow feature finish
------------------------------

Finishing a feature with zenflow will first ensure that the source branch is up to date (specifying a merge_strategy of 'rebase' will make that command happen with the `git pull --rebase` command).

Next zenflow will rebase the feature branch to the source branch.

All other functions of the 'finish' command remain the same including merging the feature branch back into the source branch as it always has with the `--no-ff` option.