gitflow-avh icon indicating copy to clipboard operation
gitflow-avh copied to clipboard

Display git flow feature as a tree

Open ivan-pomortsev opened this issue 8 years ago • 2 comments

Let's imagine that we need a lot of sub-sub-features and we do something like:

git flow feature start test-first
git flow feature start test-second feature/test-first
git flow feature start test-third feature/test-second

Then we execute "git flow feature list":

git flow feature list

And got that:

  test-first
  test-second
* test-third

Hope it could be very nice to get a tree as output of this command. Something like:

   test-first
      |- test-second
         |- * test-third

ivan-pomortsev avatar Jun 08 '16 08:06 ivan-pomortsev

+1 !! Just came to request this. Could also work for other branches besides features.

master
  |- hotfix/hotfix-1.1
  |- support/support-1.0
develop
  |- release/release-2.0
  |- feature/feature-1
  |- feature/feature-2
       |- * feature/feature-2-subfeature-1

...etc

istrasci avatar Aug 08 '18 23:08 istrasci

From Git's point of view feature based on other feature is just another branch with the same base (e.g. develop) where one branch is fully contained in second one. If you're nesting features, probably you're doing it wrong. I know sometimes it's required to start work on feature that depends on other feature which is not merged yet, but it should be edge case. If you're building some bigger feature and want to work on it step by step, you can create integration branch based on develop and then create all feature branches from this integration branch, merging them rapidly (even if some king of WIP status) so work on other sub-features is not blocked and then, when whole feature is ready, merge integration branch to develop. GitFlow is not closed box, it's a model/tool for automation - you can do anything you want to support your flow to achieve what you need. You don't have to stick only to built-in commands and conventions.

I'm :+1: for displaying base branch for each feature branch (because not every feature must fork from develop), but :-1: for displaying as tree.

Wirone avatar Dec 05 '18 09:12 Wirone