【问题标题】:Unable to get remote branch on local - Heroku无法在本地获取远程分支 - Heroku
【发布时间】:2017-03-12 06:54:29
【问题描述】:

我在我的 Ubuntu 机器上设置了 ssh 配置文件,它也可以正常工作。

今天另一位朋友新建了一个分支,把代码和分支推送到heroku上。

现在,问题是我无法在本地提取新分支。

以下是我的命令:

u@u:~/workspace/abc$ git pull heroku upgrade:master
fatal: Couldn't find remote ref upgradeu@u:~/workspace/abc$ fatal: The 
remote end hung up unexpectedly

如果我执行 git fetch,它不会显示任何响应。

我的 git 配置是:

[color]
    ui = true
[user]
    name = user
    email = user@gmail.com
[core]
    autocrlf = input
[push]
    default = simple
[http]
    postBuffer = 157286400

我的 ssh 个人资料:

Host heroku.work
  IdentityFile ~/.ssh/id_rsa_abc
  Hostname heroku.com
  User user@gmail.com
  IdentitiesOnly yes

我的遥控器是:

[remote "heroku"]
    url = git@heroku.work:abc.git
    fetch = +refs/heads/*:refs/remotes/origin/*

【问题讨论】:

  • 对 heroku master 的推拉工作完美,但无法拉动其他分支。

标签: ruby-on-rails git heroku github ssh


【解决方案1】:

你通常不会拉另一个分支。你会切换到它

  • 运行 git pull heroku 从远程更新您的本地存储库
  • 然后使用git branch显示可用的分支
  • 最后使用git checkout update之类的东西切换到分支。

【讨论】:

    猜你喜欢
    • 2022-01-23
    • 2017-09-11
    • 1970-01-01
    • 1970-01-01
    • 2011-06-29
    • 2012-01-02
    • 2017-04-19
    • 2018-09-29
    • 2013-04-30
    相关资源
    最近更新 更多