DEV Community


Posted on

A new Git plugin for feature management

Traditionally, git commit has been based on code changes. In team collaboration, we want to do a better job of recording feature-based code changes. I'd like to have a feature flags-driven commit and pull request, where a commit can point to a feature flags and only upload the code associated with that feature flags during the commit and pull request.

The approximate implementation is to integrate a plugin in the IDE (or a new set of commands for Git)

  1. Select the corresponding feature flag (from a list) and click on a "ff commit preview" button (or a line of git command) to check if codes are all related to feature flag. e.g. git commit -ff "newFeature" -preview
  2. When you are sure that all the code you will be committing is only related to the feature flag, you can proceed to complete the commit,. e.g., git commit -ff
  3. after committing, the corresponding tag will be typed on the commit

Then there will be a Portal backend that traverses the feature-related changes to the commit record via the UI. And this commit record is stored separately, even if the commit is merged or deleted by git command, it can still pull out a feature flag corresponding to the code change record separately.

I wonder if there are other people who have the same needs and ideas? I think is a better way to manage features.

Top comments (0)