如何在Heroku上更改app的git url

时间:2013-02-24 17:57:47

标签: git heroku

当我从终端I运行“git remote -v”时,得到以下内容:

heroku  git@heroku.com:obscure-taiga-9581.git (fetch)
heroku  git@heroku.com:obscure-taiga-9581.git (push)
origin  http://coastguard-quiz.herokuapp.com/ (fetch)
origin  http://coastguard-quiz.herokuapp.com/ (push)

我想替换“git@heroku.com:obscure-taiga-9581.git”部分。我该怎么做?

3 个答案:

答案 0 :(得分:49)

我认为你想要做的是推送到heroku上的coastguard-quiz repo,这样当你git push heroku时它会更新caostguard-quiz.herokuapp.com。

git remote rm heroku
git remote add heroku git@heroku.com:coastguard-quiz.git

答案 1 :(得分:3)

我不确定它会如何影响Heroku,但你可以改变.git / config中的路径

答案 2 :(得分:1)

  1. 删除"git@heroku.com:obscure-taiga-9581.git"
  2. git remote rm heroku

    然后添加新的远程存储库

    git remote add heroku git@github.com:your_nick/name_of_repo.git # this is good to copy paste from your github account