I have a master branch which merges to feature branches. It's been several times now that I'm starting to do something in feature branch and then realised that I want part of those changes in master branch. Is there a way to merge part of those changes to master without loosing the other part when merge from master runs?
let's say I make these changes in feature branch:
Line A
Line B
Line C
Now I merge that with cherry-pick to master, but Line B
is specific to that feature, so I remove it. But then merge from master to feature branch runs, and feature branch ends up missing Line B
.
What would be the proper way to avoid this? Will -n
(no commit) save me from this? I don't mind having conflicts when running merge from master to feature, but what would be the right way to get them?