6

Merging one git branch into another when it conflicts an added line or function.

Like really? You can't handle ONE LINE being added?

Comments
  • 0
    Well apparently that one line change was different from the change that happened on the other branch. Don't blame git on your mistakes.
  • 0
    @R5on11c that's the thing. There were no changes in the other branch.

    I've done this type of merge before and not had this issue.
  • 0
    I can understand your situation. But code doesn't do random slip ups. There has to be some kind of difference that conflicts between the two.
  • 0
    you can use kdiff3 to autoresolve a large number of common merge conflicts. git is quite careful and will ask you to resolve pretty much everything manually.

    You can also use git merge --strategy ours if you know that there are no changes in the branch you're merging into
  • 0
    @R5on11c once the only thing I did was remove a single empty line. Got a conflict and the last time that file was changed was 2 weeks back. Git is just careful I guess.
  • 0
    Almost forgot, sometimes you have files that contain newlines AND carriage returns. Depending on your editor this could be removed or replaced by just a newline automatically. Also trailing whitespaces can be linted away. Keep that in mind.
Add Comment