Friday, October 19, 2012

What to do when the heroku named app no longer matches the git

Evidently I changed the name of the app on Heroku using the web interface and was no longer able to push my code into heroku.

After poking around the Heroku help files, using the command line tools was ultimately unhelpful to do a rename.

What worked for me was the following:

  1. Verify the name of the git repo for the heroku app under Settings.
  2. Check what git thinks the remote repos are.
$ git remote -v
heroku    git@heroku.com:repo-name.git (fetch)
heroku    git@heroku.com:repo-name.git (push)
origin    git@gitrepo.com:arrow/repo-name.git (fetch)
origin    git@gitrepo.com:arrow/repo-name.git (push)

  1. Edit the .git/config file
 for me the offending portion was in the [heroku] section as it still pointed to the randomly generated name from Heroku instead of the named repo I had renamed it to.

  1 [core]
  2   repositoryformatversion = 0
  3   filemode = true
  4   bare = false
  5   logallrefupdates = true
  6 [remote "origin"]
  7   url = git@gitrepo.com:arrow/repo-name.git
  8   fetch = +refs/heads/*:refs/remotes/origin/*
  9 [remote "heroku"]
 10   url = git@heroku.com:repo-name.git
 11   fetch = +refs/heads/*:refs/remotes/heroku/*


5 minutes fix.  Wish all my bugs were this easy to fix.

1 comment:

  1. Merkur Progress Gaming - Carrera Casino
    Merkur Progress Gaming Merkur. Progress Gaming has been producing 코인카지노 quality products since 메리트카지노 2007 with a design that is 메리트카지노 durable, clean and comfortable.

    ReplyDelete