Git Branch Solution

54 views Asked by At

I'm facing an issue regarding git branch. I have a branch called F-branch where I want to develop new code and new features. And Later on, this is to be merged into the master branch. After merging to master, I got to realize that I just need the feature 1,3 and 4 rest of them are not required. And I need a minimum of rollbacks.
What would be the strategy should I adapt to fix this? One strategy would be not to merge all the features until all the features are developed. And after that, we cherry pick the features and merge them into the master. I've attached a photo that explains everything.
I really appreciate your input.

1

There are 1 answers

0
Timothy Truckle On

After merging to master, I got to realize that I just need the feature 1,3 and 4 rest of them are not required. And I need a minimum of rollbacks.

Your problem has nothing to do with git. You have a broken project management process.

A functional PM process should asure that you only develope features, that are really reuqsted by your clients (and payed for). Some agile methods like Scrum or Kanban have worked out sucessfully for quite a lot of enterprizes.


But git may offer a work around: You can "revert" commits like this:

 git checkout master
 git revert [shh1 sha2 ...]

Git will create new commits and apply the opposit changes.