【问题标题】:git pull heroku master failedgit pull heroku master 失败
【发布时间】:2017-10-02 10:35:35
【问题描述】:

我正在尝试将另一个开发人员推送的最新代码提取到部署到我本地系统的 heroku:

我执行了以下操作:

$ git pull heroku master failed

但我收到以下错误:

remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 1 (delta 0)
Unpacking objects: 100% (8/8), done.
From https://git.heroku.com/titan-demo
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> heroku/master
Auto-merging db/schema.rb
CONFLICT (content): Merge conflict in db/schema.rb
Automatic merge failed; fix conflicts and then commit the result.

【问题讨论】:

  • 这可能是因为您在 heroku 中使用 pg 并在本地使用不同的数据库。 BTW 为什么要拉heroku master ??
  • Please don't use Heroku as your primary code sharing mechanism.: "Heroku 提供 git 服务主要用于部署,提供克隆服务是为了方便。我们强烈建议您将代码存储在另一个 git 存储库中,例如 @987654324 @ 并将其视为规范。”
  • 您可以直接从其他开发人员那里获得该代码。 git 的显着特点之一是它不需要集中式服务器。在互联网代码直接在机器之间共享之前的日子里。您只需要通过 SSH、HTTP 访问其他开发人员的机器;在这两种情况下,他都在自己的机器上运行服务器。

标签: ruby-on-rails git heroku


【解决方案1】:
CONFLICT occurs in following file at that time the git could not auto merge the CONFLICT so you will remove the conflict in manually in this file db/schema.rb. the file conflict location is denoted as below syntax so you will remove unnecessary code and after you push the code. 

// CONFLICT Example
<<<<<<<<<<<< HEAD *code from develop*
>>>>>>>>>>develop *code form your's*

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-21
    • 1970-01-01
    • 2013-09-05
    • 1970-01-01
    • 1970-01-01
    • 2021-05-19
    • 2011-02-22
    相关资源
    最近更新 更多