致命:无效的refspec(Heroku nodejs)

时间:2018-04-28 20:10:13

标签: node.js github heroku

我在运行时收到此错误:

git push heroku master
fatal: Invalid refspec ' https://git.heroku.com/damp-reef-82414.git'


Heroku Git URL - https://git.heroku.com/lit-earth-17372.git
https://lit-earth-17372.herokuapp.com/

https://git.heroku.com/damp-reef-82414.git是heroku早期的目录, 当前文件夹通过herolu create命令的链接是https://lit-earth-17372.herokuapp.com/

的.git /配置

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "abc"]
    url = https://git.heroku.com/lit-earth-17372.git
    fetch = +refs/heads/*:refs/remotes/abc/*
[remote "origin"]
    fetch = refs/heads/*:refs/remotes/origin/*

1 个答案:

答案 0 :(得分:1)

我看到' https://git.heroku.com/damp-reef-82414.git'在开头有一个空格。

如果这是某种拼写错误,请尝试:

cd /path/to/my/local/repo
git remote set-url heroku https://git.heroku.com/damp-reef-82414.git

如果需要,可以使用相同的命令切换到https://git.heroku.com/lit-earth-17372.git