Resolving Git merge conflicts

前端 未结 4 1962
长发绾君心
长发绾君心 2020-12-13 13:55

A Git repository has been cloned on several developers\' local machines. Some changes have been made to the code in the repository. We\'re now getting the error:

<         


        
4条回答
  •  臣服心动
    2020-12-13 14:44

    It's good practice to always commit any local changes before pulling (merging) new code. If you don't commit, then Git doesn't know how you want to manage your local changes. Merge only with a clean working tree.

    There may be conflicts in the merge, due to the same files being changed locally and by somebody else. In my experience, resolving conflicts from an actual merge operation is slightly simpler than resolving the same conflict from a stash pop operation.

提交回复
热议问题