The solution for "Keep feature branch up to date" with git is, to merge the master into the feature branch from time to time, for example if a there is a change implemented in the master branch which is needed by the feature branch, correct?
I have done that once. So my history looks like:
master feature
now i want to merge
| |
| | file needsToBeChangedForNewFeature.php was changed here again
| |
|/| i get a conflict for each change since this point
| |
| | file needsToBeChangedForNewFeature.php was changed here
| |
|/
|
Now i want to finally merge this feature branch into the master, but i am getting a conflict in file "needsToBeChangedForNewFeature.php" for every line which was changed twi times (see git history example).
This seems somehow logic to me, as git cannot decide if to keep the semi-new or the really new version of the file.
So to sum up: older changes of a file in the feature branch are conflicting with the latest changes of the same file in the same feature branch.
But how can i avoid this?
Thanks a lot.