heroku远程分支

时间:2012-12-03 15:08:11

标签: git heroku

我有一个非常讨厌的问题,我在所有的应用程序上删除了我在heroku的前帐号,然后我创建了一个新的, 我想将远程分支添加到git然后问题就开始了。

git remote -v 
heroku  git@heroku.com:freezing-moon-116.git (fetch)
heroku  git@heroku.com:freezing-moon-116.git (push)
origin  git@gitbus.fiit.stuba.sk:laser_kn/laser_kn.git (fetch)
origin  git@gitbus.fiit.stuba.sk:laser_kn/laser_kn.git (push)

git remote rm heroku 
error: Could not remove config section 'remote.heroku'


vim .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
[remote "origin"]
        url = git@gitbus.fiit.stuba.sk:laser_kn/laser_kn.git
        fetch = +refs/heads/*:refs/remotes/origin/*

我的问题是如何删除破坏的远程heroku repo并添加一个新的?

THX

1 个答案:

答案 0 :(得分:0)

由于git remote向您显示远程,但.git/config没有,看起来远程在另一个配置文件中定义。

引用man git config

FILES
       If not set explicitly with --file, there are three files where git
       config will search for configuration options:

       $GIT_DIR/config
           Repository specific configuration file. (The filename is of course
           relative to the repository root, not the working directory.)

       ~/.gitconfig
           User-specific configuration file. Also called "global"
           configuration file.

       $(prefix)/etc/gitconfig
           System-wide configuration file.

看看~/.gitconfig最有可能找到你的遥控器。