Git merge failing due to conflicts

This question already has an answer here:

  • How to resolve merge conflicts in Git? 32 answers

  • These are not errors. They are merge conflicts (note, git does itself not use the word "error" here, but says "conflict").

    This is an important distinction: conflicts are normal and harmless in git. They mean work for you, but are not a problem. Git is very good at keeping conflicts as small as possible (as opposed to some older version control systems), and also is usually very explicit and helpful with its messages.

    In this case, the conflict is exactly what it says: someone deleted the files in feat_branch , but you modified the same file meanwhile. If you had not modified the file since the start of feat_branch , git would just have deleted it during the merge. If they had not deleted it, your changes would just have been kept. But in this case, git demands a human decision, since you obviously had another intent than the guy/girl deleting the file.

    If you type git status , you will get a helpful note that gives you a hint on which commands pick which resolution (ie, either delete the file or keep it).

    链接地址: http://www.djcxy.com/p/7228.html

    上一篇: Git无法合并或拉本地回购

    下一篇: 由于冲突,Git合并失败