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.
Asked
Active
Viewed 44 times
0
1 Answers
0
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.

Timothy Truckle
- 15,071
- 2
- 27
- 51
Another solution would be to rollback to that specific commit(That would be a really bad idea). I hope I convey the problem. @AndyRefuerzo – Ali Hassan Jun 28 '18 at 08:57