Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用我的应用程序从我的主分支执行 git pull 到一台本地机器,它在我的 Gemfile 锁中给我一个合并冲突错误。
我该怎么办?
您更改了 Gemfile 的版本。其他人在 master 上更改了相同的 Gemfile。
现在 git 无法决定是要保留自己的版本,还是要使用主版本,或者只是部分使用主版本。
您是否故意更改了 Gemfile?
如果是,可能git mergetool会帮助您解决冲突。
git mergetool
如果不是,您可以简单地用git reset --hard @{u}.
git reset --hard @{u}