I have my feature branch which has exceeded around 30 or more commits. Meanwhile in development branch few other features have been pushed from other developers. Therefore, Everytime a new feature is published on development, I am asked to:
- Rebase development branch onto my feature branch
- Resolve conflicts if any
- Continue developing in your feature branch
The problem
The second step is the chicken's neck here. On rebasing it gives me conflicts for every commit of that branch. This is really iterative and redundant. Note, I can't always rebase the development branch immediately since my own work in my branch remains in progress.
What I tried?
- To
squash
and reduce my commits as much as possible (but this helps least, as most of the times there is nothing to squash) - To
stash
my on going changes, and rebase development and then unstash my changes. (but here, I get conflicts as well) - Using
-preserve-merges
with rebase. (but everyone here shouts that using this is totally discouraged)
So, what is the optimal approach in dealing with rebasing development onto feature branch with least conflicts when the feature branch itself has numerous commits. I am a fresher, and so a reply with a helpful explanation (or link) will be of much help to proceed.