Currently, I used to create a new branch each time I have to add a new feature to my application.When my feature is finished and functional, I merge it with the master branch.But later, when I need to update this feature (like an improvement) is it better to create a new branch or do I need to rebase the previous with the master, do the update then merge again?For example, I have branch called modeling-member in a Ruby on Rails application. Later, I need to add some attributes to the member model (which was created in this branch). What should I do? Rebase this branch with the master, update the model and merge it again or simply create a new branch?
Reusing a merged branch, good practice?
git;branching
Create a new branch, because:A brand new branch is less likely to have merge conflicts when you're done and want to merge it into master. Few things are more error-prone than fixing merge conflicts.The feature may have gone through several changes and updates since its original implementation, making the original branch totally obsolete. The only way to bring it up to date is to merge master into the feature branch...and at that point you're just branching off master in a needlessly complicated way.If only for simplicity's sake, it's usually a good idea to have the same workflow for updates, bug fixes and new features. That applies to branching, code reviews, bug tracker usage, and pretty much everything else. The difference between updating an existing feature, adding a new feature and fixing a bug is often subjective anyway.