Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git remote-如何更改引用_Git_Github - Fatal编程技术网

git remote-如何更改引用

git remote-如何更改引用,git,github,Git,Github,我如何改变这个?当我执行git show ref时,我会看到以下内容: 963958ed832e82759362f87599bc9799bcfa46d9 refs/heads/origin 8c4e0f4c3aa147582d92302c73bf5bb81c335f60 refs/remotes/origin/main 它需要说git show ref 985b5395c54e89fc3b825464f9d41c2cf9f1bf36 refs/heads/heroku

我如何改变这个?当我执行
git show ref
时,我会看到以下内容:

    963958ed832e82759362f87599bc9799bcfa46d9 refs/heads/origin
    8c4e0f4c3aa147582d92302c73bf5bb81c335f60 refs/remotes/origin/main
它需要说
git show ref

    985b5395c54e89fc3b825464f9d41c2cf9f1bf36 refs/heads/heroku
    985b5395c54e89fc3b825464f9d41c2cf9f1bf36 refs/heads/master
    985b5395c54e89fc3b825464f9d41c2cf9f1bf36 refs/remotes/heroku/master
    985b5395c54e89fc3b825464f9d41c2cf9f1bf36 refs/remotes/origin/master

如果需要显示来自远程heroku的引用,您应该:

  • 确保您有这样的遥控器。
    如果没有:
    git远程添加heroku/heroku/url

  • 从heroku获取,以便在本地拥有git show ref可以显示的内容:
    git-fetch-heroku


为什么会这样说,怎么说?试想show ref应该说些什么有什么意义,为什么它要特别这么说?