Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal: remote heroku already exists

Tags:

git

heroku

I am running the following commands and get fatal: remote heroku already exists. error.

I dont know what is wrong here, it used to work without errors before.

git init
git add .
git commit -m 'Initial commit'
git remote add heroku [email protected]:myapp.git
like image 438
Efe Avatar asked Jun 28 '13 13:06

Efe


People also ask

How do I delete remotes?

Deleting remote branches To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .


1 Answers

Open .git/config, you will find

[remote "heroku"]
url = [email protected]:xxx.git
fetch = +refs/heads/*:refs/remotes/heroku/*

Change xxx to the app name you want to push. Then

git push heroku master

It works for me. You can have a try.

like image 197
wgr Avatar answered Sep 20 '22 14:09

wgr