I recently started working with GitFlow model as implemented by bitbucket. And there is one thing that is not completely clear to me.
We try to regularly address our technical debt by backlogging, planning, and implementing the refactoring tasks. Such refactoring branches end with pull-requests that are merged in develop
. My question is where do the refactoring branches belong in GitFlow?
- Using
feature
prefix seems the most logical, however it does not feel entirely right, because refactoring does not add any new functionality. - However using
bugfix
prefix seems not right as well as there is no actual bug refactoring fixes. - Creating a custom prefix on the other hand seems like complicating if not over-engineering the things.
Did you have such situation? Which practice do you use to address this? Please explain why.
refactor
, then it's clear what transform each merge is expected to do to the product (bugfix: fix broken behaviour, feature: add new behaviour, refactor: retain previous behaviour). But @MrCochese is right, it should really be a part of the other work you're doing not a separate task. Note also that if your refactors break the build, they aren't refactors!